Hacker News Clone new | comments | show | ask | jobs | submit | github repologin
Why numbering should start at 0 – Edsger Dijkstra [pdf] (www.cs.utexas.edu)
3 points by thunderbong 3 hours ago | hide | past | web | 1 comment | favorite





Counting also starts at 0. The reason many people believe it to start at 1 is due to them calling out counts only post-increment.

For instance, if during a car ride you play a game of counting the number of pink cars you see along the way, then you start with a count of 0 in your mind (although you may call it "I haven't seen any" instead). And only when you see a pink car will you exclaim "1". But you may never see that pink car and still be left with a final count of 0.

So instead of saying counting starts at 1, it's more accurate to say that post-increment counts start at 1.




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

Search: