Re:Is Fortran better than Python for teaching basics of nume...
by scheme271 on Wednesday September 24, 2025 @04:47AM
(#45357824)
Good luck getting a community with literally hundreds of years of literature using 1 based indexing to change.
[ Parent
| on HN ]
Re:Is Fortran better than Python for teaching basics of nume...
by Skeime on Thursday September 25, 2025 @12:00PM
(#45374480)
I did have one or two math professors who would use x_0 and x_1 instead of x_1 and x_2 when they had to name two objects.
But I have also seen places where 1-based indexing was used despite being "obviously wrong". I don't quite recall what it was, but there was sequence of objects A_1, A_2, ... and a natural way of combining A_k and A_l to get A_(k + l - 1). Had the indices been shifted by 1 to be 0-based, the result would have been A_(k + l), which would be much nicer to work with.