[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Locals in Lua Environments
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Tue, 29 May 2007 17:55:53 -0400
> 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.