[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Question about __index and classes
- From: Michael Kirsch <mkirsch358@...>
- Date: Sun, 28 Aug 2011 07:16:08 -0400
> Remember that Lua has no notion of function names; function in Lua are first
> class values; "Method1" is not the name of a function inside "MyClass", but
> it is the name of a key whose value happens to be a function.
> Moreover, bear in mind that setting a metatable on a table, doesn't make it
> automatically an object of some class.
> The OO terminology is a useful abstraction over all this stuff, but remember
> that Lua has no "true classes" and this is only one of the many approaches
> to OO .
I understand that, I just didn't know that the ":" operator didn't
look directly into the metatable.
Anyway, how do I say that my issue is solved? Because many people are
still posting answers. I have almost no clue how mailing lists work.