lua-users home
lua-l archive

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

Strictly speaking it's also argument against getfenv ;-)

If there were no getfenv then we could move closures without global references out of the loop. 


On Wed, Feb 10, 2010 at 9:13 AM, Mark Hamburg <> wrote:
On Feb 9, 2010, at 10:56 AM, Vyacheslav Egorov wrote:

Ahm... I am wrong. You can't simply hoist closure creation in the presence of functions environments (different closures might actually end up having different environments). 

Yes. That's an argument against setfenv. It inhibits a useful optimization for what is probably a rarely used feature.