3 ms·
But that's the point, once you think of indexes as distance things make much more sense. The index is the distance from the first element. Thus, the third elem
by lokedhs 10y ago
But that's the point, once you think of indexes as distance things make much more sense.
The index is the distance from the first element. Thus, the third element is two elements away from the first, thus it has index 2.
I think the only reason zero-based indexing is not the standard everywhere is because some people (usually non-programmers) have a problem with the idea that the fifth element has index four.
I am suggesting that this is a linguistic problem that has messed up programming.
- kazinator 10y agoConsequently, when those people do music, they have to accept that something called an octave has seven notes, and inverting an interval is based on the "rule of nine", thanks to the way they defined intervals as one based.