lua-users home
lua-l archive

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



> On Behalf Of Mark Hamburg
> If C closures with no upvalues were common, one could presumably
extend
> Lua
> to put them directly inline like light userdata and thereby avoid the
> overhead of a closure.

I suppose that could use less memory, and in conjunction with declaring
names as locals that could save more. I think light userdata is
essentially a number which is passed around, perhaps a "light function"
could be introduced where you don't want function environments, upvalues
etc., just like you don't want metamethods for light user data. It's
just a cheap function declaration.

Nick