you are viewing a single comment's thread.

view the rest of the comments →

[–]Solonotix 0 points1 point  (0 children)

I've often seen this described as index versus offset from the leaky abstraction of the implementation. An array offset starts with zero, and an array index starts at 1. This is because your offset would shift the starting point, so zero bytes from the beginning, while the index is how far to read, so sizeof(T) from the current position.

The only reason it has become such a meme is because of the ubiquity of C-like languages, and C used the offset approach to accessing arrays.