lua-users home
lua-l archive

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

On Thu, Feb 25, 2010 at 1:50 PM, Enrico Colombini <> 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