Re:Lua, a Misunderstood Language
by berkut on Friday January 15, 2021 @05:49PM
(#25797583)
Yep, I think consistency is key here...
Especially when it's used as an embedded language in a C/C++ app, or an additional Lua API alongside other APIs that exist already.
Having to convert back and forth between 0 and 1 based indices is very annoying, and error-prone. You can make helper methods to abstract some of it, but that only gets you so far, and it's annoying (at least I found it that way) having to context switch your brain depending on what part of the call stack you're looking at.
Especially when it's used as an embedded language in a C/C++ app, or an additional Lua API alongside other APIs that exist already.
Having to convert back and forth between 0 and 1 based indices is very annoying, and error-prone. You can make helper methods to abstract some of it, but that only gets you so far, and it's annoying (at least I found it that way) having to context switch your brain depending on what part of the call stack you're looking at.