|
|
|
|
|
by WolfeReader
256 days ago
|
|
The 1 indexes are only a difference from what you're used to. Lua was made by mathematicians, who of course wanted to address the first element as 1, the second element as 2, etc. 0-indexing makes sense in the context of C where the index operator is syntactic sugar for pointer arithmetic. In higher-level languages like C# and Python and others, it's pretty much just a leftover habit from C devs that we all got used to. Global by default is a perpetual issue, agreed. |
|
https://www.lua.org/history.html