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

Pretty much any algorithm that involves mul/div/mod operations on array indexes will naturally use 0-based indexes (i.e. if using 1-based indexes they will have to be converted to/from 0-based to make the math work).

To me this is a far more compelling argument for 0-based indexes than anything I've seen in favor of 1-based indexes.



Forget multiplication, even addition becomes simpler.




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

Search: