Re:Why do arrays start at 0?
by randomdata on Wednesday August 24, 2022 @01:13PM
(#32582545)
If we (speaking as a North American) count from 1, does that mean other cultures (e.g. Korean) count from 2?
[ Parent
| on HN ]
No, it just means we have a different notion of what a year is in regards to age. Similar to how different cultures can use different units of measurement for length, mass, etc.
Re:Why do arrays start at 0?
by randomdata on Wednesday August 24, 2022 @01:17PM
(#32582610)
Yes, exactly. One of which carries an implicit zero indexing. The date of birth doesn't disappear just because you decided to use a different measuring device.
No, it doesn’t carry an implicit 0 index. Measuring age (in the West) is like measuring distance. You start at 0, but that doesn’t mean the first item is at index 0.
Re:Why do arrays start at 0?
by randomdata on Wednesday August 24, 2022 @01:47PM
(#32583076)
If you took a standard ruler, a measurer of distance and which has literal index marks painted on it, and placed items along it, the item found at the head of the ruler would be found at the 0th index. You're quite right that we think of birth and its anniversaries in the same way.