3 ms·
It is due to the implementation used for lexical scoping. With 5.2, I actually consider it wrong to think Lua code has a global scope and it has no global get o
by aDevilInMe 13y ago
It is due to the implementation used for lexical scoping. With 5.2, I actually consider it wrong to think Lua code has a global scope and it has no global get or set VM op instructions, there is however an environment. The environment's default name being _ENV and _ENV can also be local. _G is normally, in 5.2, an entry in _ENV that points to back to _ENV.