This might be controversial but if the first element is [0] I think the last element should be [^0].
Intuitively I would expect
a[^n] == reversed(a)[n]
Not really a question, more an opinion, but usability and intuition matters to me.
The beauty of Nim is you can define your own backward index operator to override the normal one that acts like this. Though I'm not sure if the proposal that made non-system symbols always override system symbols was implemented, so maybe you can't name it ^ yet.
Please don't do this, you'll confuse every single person reading your code including yourself.
Personally I think what makes little sense is to have the first element at zero
+1, I worked a little bit with Julia, it has zero based arrays, it feels better.
When you work with low-level protocols and buffers 0-based makes more sense.
Julia inherited 1-based for Fortran and Matlab.
I believe they mentioned somewhere that it was a conscious choice, as it makes more sense, not just random inheritance.
When you work with low-level protocols and buffers 0-based makes more sense.
Maybe. But we are talking about majority of use cases. I doubt that low-level protocols and buffers are the main Nim use case.
I doubt that math and science are the main Nim use-case either.
A system language better be excellent at the base layer.
When you work with low-level protocols and buffers 0-based makes more sense.
I don't see how that follows.
Also: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
Oh god not this again, I've debunked it multiple times already. Exlusive upper bounds only work when you have a sentinel value that you don't want to iterate over ... that's most problematic for binary computers when you need to iterate over every byte/enum/word/etc value.