lua-users home
lua-l archive

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


> Thanks Dimitris. That sounds like another reason to look more into Lua 5.2.
> I've only been reading about it so far, using 5.1 for everything, and I
> won't be changing my current project soon, but I will continue to
> investigate 5.2 for practical reasons to switch (or to start using it for
> new projects).

Another useful feature of 5.2 in the same context (of giving objects
computed properties or dressing core objects as simple Lua tables) is
the ability to give tables a __len metatmethod and the fact that such
metamethods will be honored by lua_len for userdata as well as tables.
 Also note that switching from 5.1 to 5.2 is no major task, at least
in terms of changes needed to your application and changes in
semantics/syntax of the language itself so you might wan to consider
it if 5.1 is giving you a hard time.