3 ms·
Except 1-based indexing is what we use in normal language. We don't use "zeroeth" or "player (number) zero" etc. And the word "first" is shortened to 1st etc. P
by wizofaus 4y ago
Except 1-based indexing is what we use in normal language. We don't use "zeroeth" or "player (number) zero" etc. And the word "first" is shortened to 1st etc.
Personally I think we'd be better off if programming languages stuck to the same convention - off-by-1 errors aren't the hardest problems to deal with but they're still annoying.
- misttar 4y agoThe 2 major blunders in programming: 1) Off by one errors.
- ChickeNES 4y agoWell: https://www.merriam-webster.com/dictionary/zeroth https://www.merriam-webster.com/dictionary/zeroth
- wizofaus 4y agoSure, it's technically a word, but hardly one you'd casually drop into your conversations (with non-programmers)
- Quekid5 4y ago> "player (number) zero" That would be because any game worth playing has at least one player... and so it's natural to continue from there. (In terms of language.)
- OscarCunningham 4y agoYou might have heard of Conway's Game of Life.
- Quekid5 4y agoFair :)
- lokedhs 4y agoThat's confusing ordinal and cardinal numbers. The element with index 0 is the first number. The element with index 1 is the second number, and so on. Using the term "zeroth" is basically some form of showing off (even though it's kinda fun), but will be utterly confusing when you get to the fifty-second element which is the last in a group of 53 elements.
- wizofaus 4y agoI'm not confusing them, my point about abbreviating "first" as 1st was that in typical speech we start counting at 1. Nobody says "let's start with item zero on the list". But programmers are stuck with having to say/think "item 0 in the array".
- lokedhs 4y agoI don't disagree with you. I just don't think a programmer should be confused about the statement "item 0 is the 1'st item".