[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: setmetatable vs setfenv consolidation? (was Re: setmetatable vs debug.setmetatable?)
- From: Stefan Brantschen <sbr@...>
- Date: Fri, 3 Aug 2007 15:18:13 +0200
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