[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: default table in C functions
- From: Javier Guerra Giraldez <javier@...>
- Date: Thu, 6 Jan 2011 09:24:26 -0500
On Thu, Jan 6, 2011 at 5:29 AM, jseb <gmane2010@finiderire.com> wrote:
> module:function(param) <=> module.function(module,param)
>
> it seems only useful when using classes.
more exactly, when using objects; which doesn't imply classes
o:f(...) => o.f(o,...)
function o:f(...) => function o.f(self, ....)
and the choice if you want to use classes, or prototypes, or loose
methods, or whatever is yours. That's one of the things i love about
Lua, it doesn't force you a 'holy' pattern. in most cases even
different schemas can freely interoperate.
--
Javier