lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
There are no hidden details; just follow rules (1) & (2). That is what
the compiler will do.

So, always if I understand correctly, a function definition:

 function f() body end

would be the equivalent of:

 _ENV.f = function() body end

in which case, wouldn't setting _ENV = nil (to forbid assignment to globals) also prevent the definition of functions?

  Enrico