Say I want to index an array modulo N. I have to write
array[ M mod N + 1 ]
to get the right index. This is at best clumsy.
The reality is that, whether people realize it or not, we actually start counting most things from zero. My bank account doesn't start at 1, nor does any stock price, nor number of cattle or NSA agents hiding in bushes. Zero is a perfectly reasonable speed to go (especially at a stop sign). None of these are "at least one".
The confusion beginners have is that 0 usually indicates a lack of something, while an array starting at 0 does have content. People don't start counting a heard of cattle with 0, since 0 would indicate the absence of any cows. However array x[0] can contain a value.
No, you do not start counting things at zero. Because at zero that thing you are trying to count doesn't exist. If I put five rocks in front of you and ask you to count them, you don't point at each rock and say "zero, one, two, three, and four".
The stupid part of all this is that typically if you request the length of the array of our rocks, you will get five. But request the index of the last entry and you will get four. The simple fact that to refer to the last index in the array you have to use something like array.length - 1 points out the silliness of the whole thing.
EDIT: After a moment I felt the need to add that I'm not necessarily saying that all arrays need to start at one over zero, it's just that the whole thing is silly on first appearance. If the reason to start at zero is technical then fine, but as frustrated developers we have to have something to complain about.
Bank accounts require an opening deposit, and to preempt any attempt to suggest that's not what was meant, active bank accounts may be overdrawn making the choice of analogy even less justified.
Likewise, stocks first come to market with an initial price And a stock with a price of zero or zero shares is for all practical purposes in the first case and existentially in the second case, not a stock.
And while yes there might be zero NSA agents in the bushes, that means that the list or set of NSA agents in the bushes is empty, I.e. that there is no first agent, and the value at index of the first agent is the same as the value at the second - nil, void, undefined or an error...and hopefully not the latter since there are more than enough of them already.
array[ M mod N + 1 ]
to get the right index. This is at best clumsy.
The reality is that, whether people realize it or not, we actually start counting most things from zero. My bank account doesn't start at 1, nor does any stock price, nor number of cattle or NSA agents hiding in bushes. Zero is a perfectly reasonable speed to go (especially at a stop sign). None of these are "at least one".