Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

My argument for 0 based indexing is working with multidimensional indices.

If I have a 3 row and 2 column matrix stored as a single array of 6 elements, I might want to index it using the row,col index.

With 0 based indices, this is fairly simple. `m[r, c] = m[2r+c]`

With 1 based `m[r, c] = m[2r+c-2]`

This is similar to the offset based argument but I think it is more related to the actual index rather than the offset.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: