|
|
|
|
|
by eigenspace
92 days ago
|
|
> You asked for a good argument - I provided one. 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. |
|
Of course you do - you very likely didn't start programming in assembler.
You literally asked "How do I get to .." implying you wanting street instructions, distances, etc.
In assembler the third element begins literally and straightforwardly at the address base plus two (element widths).
That's not "a quirky adaption" is it? It's a dull pragmatic address of the start of the third element - the answer to the question you posed.