2 ms·
Why numbering should start at 0 – Edsger Dijkstra [pdf]
- deleted 2y ago[deleted]
- tromp 2y agoCounting 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.