4 ms·
If only they didn’t chose 1 based array indexing, like matlab. Having worked with matlab and for that reason I can’t seem to take them seriously.
by jppittma 3y ago
If only they didn’t chose 1 based array indexing, like matlab. Having worked with matlab and for that reason I can’t seem to take them seriously.
- baggepinnen 3y agoBut you can take Fortran seriously?
- pjmlp 3y agoPlenty of serious languages have either 1 based indexing, or allow the flexibility to set lower boundary explicitly.
- marmalade2413 3y agoThe choice of 1 based array indexing is due to Julia having it's roots in mathematics - which is a common choice for mathematics based programming languages (e.g. Fortran, Julia, MATLAB/GNU Octave, Mathematica, R and Wolfram). The reason being is that matrix notation starts at 1 and not 0. For a comparison on array indexing in different programming languages see here: https://en.wikipedia.org/wiki/Comparison_of_programming_languages_(array)#Array_dimensions https://en.wikipedia.org/wiki/Comparison_of_programming_lang... From personal experience, I wouldn't let something as simple as starting index getting in the way of programming for a language as you'll soon start automatically switching to thinking in 1 based and 0 based indexing depending on the programming language.
- amj7e 3y agoIf you think 0 or 1 based indexing will hinder your ability to write a program, it's not the indexing, it's a skill issue.