lua-users home
lua-l archive

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


> [...] I'm wondering why we lost
> control over arbitrary chunk's environment with 5.2.

If I understood you correctly, this point has been discussed several
times in this list. The old 'setfenv' mechanism is "too powerful", as
it breaks the basic abstraction mechanism of functions.

To set the environment of another function is akin to accessing its
upvalues, something better provided by the debug library.

-- Roberto