lua-users home
lua-l archive

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


On Mar 31, 2010, at 9:07 PM, Roberto Ierusalimschy wrote:

> No. It implies that you will be able to do what setfenv/getfenv did
> by using debug.setupvalue/debug.getupvalue.

Hmmm... if that's the case... why not keep setfenv/getfenv and re-implement it in terms of _ENV?

> (There are some caveats
> [see message from Mark Hamburg], but it is mostly doable.)

Are you referring to the, hmm, subtlety about shared _ENV?

"If you want to follow the original semantics, it is still possible (mostly), but it is not trivial. "

http://thread.gmane.org/gmane.comp.lang.lua.general/63344/focus=64190

That seems a good reason enough (i.e. not trivial) to let setfenv/getfenv implement it, no?

Also, out of curiosity, what's driving that sudden hatred for setfenv/getfenv and the apparent new quest to replace it with these various 'in' or '_ENV' or ... proposals?