3 ms·
Indexing starts at 1 in math mostly because in history, people were afraid of 0, and it's hard to change conventions.
by xigoi 4y ago
Indexing starts at 1 in math mostly because in history, people were afraid of 0, and it's hard to change conventions.
- oblio 4y agoDebatable. It makes sense to say "the first element", regardless of mathematical connotations. We've had this kind of expression in almost every language across the world long before we invented multiplication. Saying the "the zeroth element" is just... weird and slightly nonsensical.
- xigoi 4y agoYes, because language developed at a time where people didn't know about zero.
- oblio 4y agoZero still would most likely wooldn't make sense. Zero is nothing, it can't be anything. Even ordinally. 1 is something and it fits very well for the first position... outside of programming :-)
- xigoi 4y agoIn 1-based indexing, the index of an item is the number of items you've already seen, including the one you're looking at. In 0-based indexing, the index of an item is the number of items you've already seen, excluding the one you're looking at.