[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Isn't load() in 5.2 too naive about _ENV?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 6 Oct 2011 10:49:53 -0300
> [...] 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.