[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: a new proposal for environments
- From: Jim Whitehead II <jnwhiteh@...>
- Date: Thu, 25 Feb 2010 13:51:37 +0000
On Thu, Feb 25, 2010 at 1:50 PM, Enrico Colombini <erix@erix.it> wrote:
> Jim Whitehead II wrote:
>>
>> Of global functions, yes I suspect, which is the intent of setting
>> _ENV to nil. If the user wants to create local functions, they are
>> certainly still able to do that.
>
> Though, thinking about it, to prevent the definition of globals it would
> probably be better to set a metatable for __newindex on _ENV, rather than
> jut set _ENV = nil. Otherwise library functions would be inaccessible.
Indeed, and you'd have the power to do either!
- Jim