Re:Nelua Programming Language
by andrewmcwatters on Tuesday August 24, 2021 @05:50PM
(#28295422)
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.
[ Parent
| on HN ]
You 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.
Re:Nelua Programming Language
by andrewmcwatters on Wednesday August 25, 2021 @02:57AM
(#28298728)
Yep. Totally get that.