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

0-based array indexes make sense when what you are working with is laid out in memory from an offset. Honestly, if we cared about purity literally everything else (linked lists, etc) should be 1-indexed, but, stuff like composition and abstraction turned out to be more important, so we're stuck with 0-based indexes for everything.


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

Search: