3 ms·
The way I tried to resolve 0 vs 1 based indexing in my head was is they have slightly different contexts. 0-based indexing tells you have far you are from the o
by coreyd 10y ago
The way I tried to resolve 0 vs 1 based indexing in my head was is they have slightly different contexts. 0-based indexing tells you have far you are from the origin, the first element whereas 1-based indexing is useful for when thinking about how many elements you have.
- deleted 10y ago[deleted]
- dTal 10y agoAh, counting vs measuring! That makes a lot of sense. In the west, we measure our age and start from 0. In China, they count their age (number of distinct years someone has been alive in) and thus start from 1. In fact, in China, if you are born on new years eve you can be 2 years old at 2 days old!