lua-users home
lua-l archive

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

Dirk Laurie wrote:

This is something I did not know: that the C API can be
that aware of something done in the calling Lua program.
Setting a metatable hooks in very low down!

The C API mirrors Lua behavior pretty closely. If you don't want metatables triggered... well, thats what rawset is for.

My general preference for "hybrid" modules is to pass the extra data as parameters to the module and do something similar to
    local x, y, z = ...
as the first line of code.

I wish that, for this purpose, Lua had a feature like most _javascript_ interpreters do which lets you say "This fragment of code has these parameters" and let you give them names.