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

You're both right.

You want to measure the distance from a starting point (zero), the person you're replying to wants to count/label things from a starting point (one).

The distance method doesn't work as well for picking items from a bag, and the counting method doesn't work as well for calculating offsets.

They can both work for arrays, so neither is wrong.



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

Search: