|
|
|
|
|
by KenoFischer
3556 days ago
|
|
Many people think this was added for support of 0 offset arrays, but that's only a side effect really. This feature was requested by people who work with rather odd arrays (e.g. diagonal slices through high dimensional data). I have mentioned in previous threads on the subject that julia's 1-indexed arrays don't matter much in practice because the generic APIs hide that fact most of the time. This just adds the last bit of code to make that completely true and adds documentation/cleanup. For those seeking more information, I'd recommend Tim Holy's JuliaCon keynote on the subject: https://www.youtube.com/watch?v=fl0g9tHeghA |
|
My guess is that most people who prefer zero-based feel strongly about it, and most people that like one-based don't care that much. If it really doesn't matter that much, I think Julia should've gone with zero. FFTs, Vandermonde matrices (least squares), polynomials, and pretty much anything where the array subscript relates to the mathematics is cleaner with zero-based arrays.