[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: setmetatable vs setfenv consolidation? (was Re: setmetatable vsdebug.setmetatable?)
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Fri, 3 Aug 2007 15:11:03 -0400
PA wrote:
>> IMHO, I'd think less about how to change Lua, but how to use what's
>> available... :-)
>
> Good point, good point, I shall ponder that wisdom :)
>
> That said, in the case of environment vs. metatable, there is perhaps
> too many ways to express the same thing?
The fact that userdata have both a metatable and an environment allows
to easily have one of the two on a per object basis, and the other on a
per class basis. It's not necessary, but very useful.