lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Jan 6, 2011 at 5:29 AM, jseb <> 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.