4 ms·
Source? One of the best arguments, that is personally relevant to the work I do, is that indexing in math often starts at 1 (e.g. the indexing of rows and colum
by idunning 11y ago
Source? One of the best arguments, that is personally relevant to the work I do, is that indexing in math often starts at 1 (e.g. the indexing of rows and columns of a matrix). Translating this to code results in a mental overhead of mapping the math-index to the code-index, a cost I don't pay in Julia.
- Redoubts 11y agohttps://github.com/JuliaLang/julia/issues/558 https://github.com/JuliaLang/julia/issues/558 > There is a huge discussion about this on the mailing list; please see that. If 0 is mathematically "better", then why does the field of mathematics itself start indexes at 1? We have chosen 1 to be more similar to existing math software. A post above also appeals to mathematica. It's been a while since I've had to internalize the "cost" of zero indexing, so this never felt very compelling.