5 ms·
Well, you can still use Lua 5.4 from inside Nelua since it's integrated as part of the backend mechanism for the metaprogramming and not only, therefore I don't
by stefanos82 5y ago
Well, you can still use Lua 5.4 from inside Nelua since it's integrated as part of the backend mechanism for the metaprogramming and not only, therefore I don't think it breaks portability...unless I did not fully understand you correctly.
Can you please clarify a bit more your concern about it?
- andrewmcwatters 5y agoIt 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.
- newobj 5y agoWell, for starters, the arrays are 0-based, so ...
- pull_my_finger 5y agoArrays are 0 based, when tables are implemented they will be indexed from 1. I believe one of Nelua's design goals is that unaltered Lua code will be valid Nelua code.
- renox 5y ago>Arrays are 0 based, when tables are implemented they will be indexed from 1 Really?? I can see all the "off by one" bugs already! I wonder if a tool to convert Lua to Nelua wouldn't be a better idea than making the language incoherent. Or maybe always make the programmer select the offset like Ada does.