3 ms·
Lua really is a nice little language. I do wish it had 0-based arrays like everything else in common use though.
by thrower123 8y ago
Lua really is a nice little language. I do wish it had 0-based arrays like everything else in common use though.
- pmarreck 8y agoApparently it was an evolution of Sol, which wasn't designed for programmers. You'd think that everyone in computer science would have read https://www.cs.utexas.edu/~EWD/ewd08xx/EWD831.PDF https://www.cs.utexas.edu/~EWD/ewd08xx/EWD831.PDF by now, though. Makes a fairly airtight case for zero-based indices. I've noticed that in functional languages, the presence of enumeration operators makes indexing in any case almost entirely unnecessary. Perhaps the original problem was just a "design smell" all along.