lua-users home
lua-l archive

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


Mildred wrote:
> If the function is defined in the global environment, when you do
> getfenv() it returns you exactly _G. Not a copy of _G So having
> access to function arguments would mean make them global (because
> they would be added to _G)  

Having access to function arguments could also mean that a function by
default has its own environment containing only arguments with both
__index and __newindex pointing to its parent environment (usually _G).
Neither solution is backward compatible though.