[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is Lua 5.2-work4's loadin function too strict?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 23 Aug 2010 14:56:17 -0300
> I think that "loadin(_ENV, ...)" may become a common pattern in Lua
> 5.2 for loading something into the same environment as the function
> doing the loading. I also think that "_ENV = nil" may become a common
> pattern for catching accesses to global variables. Unfortunately,
> these two patterns are currently incompatible as "loadin" only accepts
> tables for its environment parameter. Hence I think that "loadin"
> should be changed to allow a wider range of values for its environment
> parameter.
Actually, there is no reason to reject any value for _ENV (and for loadin).
-- Roberto