3 ms·
> 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 wor
by eigenspace 1mo 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.
- defrost 29d ago> , I just see adaption to a quirky convention. 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.
- eigenspace 29d agoI did not say "How do I get *to* ..". > Of course you do - you very likely didn't start programming in assembler. I did not, and I do not think that conventions from assembler should influence basic ergnonomic design decisions of modern high-level langauges.