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

I like 0-based indexing because it makes mathematical sense. By the ordinal construction of the natural numbers, e.g. 5 ~= {0, 1, 2, 3, 4}. So an array of length 5 has indexes corresponding to the five set-theoretic elements of 5.


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

Search: