Re:Possible Python rival? Programming language Julia is winn...
by bb88 on Sunday September 02, 2018 @03:58PM
(#17898342)
From that document:
This code implicitly assumes that vectors are indexed
from 1; if dest starts at a different index than src,
there is a chance that this code would trigger a
segfault. (If you do get segfaults, to help locate the
cause try running julia with the option --check-bounds=yes.)
So it comes with a tradeoff, namely that if someone else chose different bounds on an array other than [1..n] and you try to access it the standard way, you'll get a segfault.This would scare me away from using anything other than the default indexing on an array in Julia.
> Julia supports arrays with arbitrary indices.
https://docs.julialang.org/en/latest/devdocs/offset-arrays/
I personally haven't had any problem with 1-indexing when I used to program a lot in MATLAB. Maybe that's because I first learned to program using QuickBasic, which has 1-indexing. I don't understand the passion for 0-indexing (I know the arguments).