3 ms·
It seems like global is a requirement for newindexing on _G (or if _G is even a thing in Nelua) from the documentation unless I'm reading it incorrectly.
by andrewmcwatters 5y ago
It seems like global is a requirement for newindexing on _G (or if _G is even a thing in Nelua) from the documentation unless I'm reading it incorrectly.
- edubart 5y agoYou are correct, but this is an enhancement to have better compile time type checking and runtime efficiency. In the future _G table with similar Lua semantics is considered to be implemented to have better compatibility with Lua code. But using the "global" keyword will always be recommended, this way the compiler can do better type checking and generate more efficient code.
- andrewmcwatters 5y agoYep. Totally get that.