lua-users home
lua-l archive

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


On 04/05/2011 23.46, Roberto Ierusalimschy wrote:
Please, consider the following toy code:

[...]

This is the kind of use that deserves the use of the debug library,
because you explicitly want to break the usual visibility rules.


Yes, definitely!

Clear separation of concerns. Lua is lexically scoped and _ENV & C. is coherent with that. In this use getfenv/setfenv were a workaround to emulate dynamic scoping, so I agree their use must be restrained and marked as "beware - know what you are doing".

[...]


-- Roberto