lua-users home
lua-l archive

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

On 3 Aug 2007, at 14:47, PA wrote:

After all, a table metatable or a function environment seems to be very much alike... any reason(s) not to make them the same?

setmetabletable( aFunction, aMetatable ) = setfenv( aFunction, anEnvironment )

Much alike?

-- metatable: place to redefine behavior
-- environment: global storage space

IMHO, I'd think less about how to change Lua, but how to use what's available... :-)

With regards
-- Stefan