I find it easier not to make mistakes when I index from 1.
The issue stems from the word "index" in the sense of "to count" .. that the first cell is numbered 1 makes sense to some.
What is actually happening is measurement, or the offset from the origin of memory.
The first inch starts at zero on the tape measure and ends at 1, that first inch has an offset of zero.
For all manner of reasons to do with measuring memory as one might measure wood a great many people think in terms of memory offsets.
[1] https://www.cs.utexas.edu/users/EWD/
The issue stems from the word "index" in the sense of "to count" .. that the first cell is numbered 1 makes sense to some.
What is actually happening is measurement, or the offset from the origin of memory.
The first inch starts at zero on the tape measure and ends at 1, that first inch has an offset of zero.
For all manner of reasons to do with measuring memory as one might measure wood a great many people think in terms of memory offsets.
[1] https://www.cs.utexas.edu/users/EWD/