Re:Lua, a Misunderstood Language
by brundolf on Friday January 15, 2021 @05:36PM
(#25797453)
Agreed. 1-indexing may be more intuitive for humans broadly, and this may have been a good argument before C became ubiquitous, but when it comes to programmers the landscape of what's intuitive is different; 0-indexing is a deeply ingrained habit. Very few norms are so universal across programming languages
[ Parent
| on HN ]
But it's not universal, since there are established languages like Fortran and R which are 1 based. And Fortran proceeded C.
That’s more dependent on language syntax IMO. When you have traditional C-style loops, maybe. When you use ranges, iterators etc. it doesn’t make any difference.
If Lua is range/iterator-heavy (I haven't used it), then yeah that would definitely ease the burden, but I wouldn't say it doesn't make any difference unless you never ever index anything directly