| You asked for a good argument - I provided one. > but why are you trying to think about a list of elements in terms of offsets from the origin I don't try to think about them in this way - I do and have always thought about them in this way - in software terms for 50 years, in real world cut, saw, and hammer ways for over 60. > I find it much easier to think in terms of ... Which is the crux of the issue really, that's how you think. > v[i] is the i-th element of my vector. I think of V as the start of a row of elements. V+0 is equivalent to V and naturally the start of the first element. V+1 is the start of the row, plus one - the literal start of the second element. I've always thought of V[i] as offsets, "jump overs" if you will. It comes naturally for many that have worked with their hands on physical objects and worked with tape measures. > but it is not something that necessarily needs to be polluting the semantics of a high level language. Either way of thinking works - I spent decades going back and forth from Fortran to C, and people are free to make their high level languages however they wish - it's trivial to move from one to the other. There are even some funky (or eyeball gouging) tricks done to preamble a data run with meta data, leading to V[-1] indexing being commonplace (in some domains) |
I don't see a good argument though, I just see adaption to a quirky convention.
> Either way of thinking works - I spent decades going back and forth from Fortran to C, and people are free to make their high level languages however they wish - it's trivial to move from one to the other.
Here I agree. I have no real problem using a 0-based indexed language, I adapt to it quickly (or as you mention a -1 indexed language. Julia itself actually stores type-level metadata at the -1 index of a pointer to a mutable struct)
I just dislike when people try and turn every conversation about julia into "oh it's 1-based indexed so that disqualifies it", and act like 0-based indexing is some god-given most natural way to do all indexing.