lua-users home
lua-l archive

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


Am I the only lua user who actually uses getglobal/setglobal?

No, I've just started using them to give a more natural syntax for C macros (via Luaswig). In general, any object that just has set/get methods may usefully be represented as a global using setglobal/getglobal.
- no more tag methods for basic types: only tables and userdata can have
a "handler-table". Moreover, "basic" tables and userdata (that is, those that
you did not set a handler-table) cannot have tag methods, either.

This change would be less worrying if there were a slightly nicer way of adding new basic-like types, e.g. ints. I'm not even sure this needs any special support; just a skeleton library for adding support for a new number type would be useful (I suppose that conversion to and from the standard number type and string type would also be useful).
--
http://sc3d.org/rrt/