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

> I have never found anyone who found 0-based indexing natural or intuitive.

It is pretty intuitive when thinking about natural numbers as steps along a path. Then, zero is the number that means "you are already there".



just... no. We are not talking about a number line here, we are talking about array indexing. That is a list of things that you count starting from the beginning. Like, no one lines up their children and says 'here is my Zeroth child'.

There is a reason that Fortran, which was designed for science and engineering, uses 1 based indexing: because it makes sense when counting things, as opposed to dealing with some internal arcana of a computer's memory model.




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

Search: