lua-users home
lua-l archive

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

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.