News for hackers. Stuff that matters.
Re:Why do arrays start at 0? by brianzelip on Wednesday August 24, 2022 @01:10PM (#32582503)
So how old is a not-yet-1-year old?
Re:Why do arrays start at 0? by nomel on Wednesday August 24, 2022 @01:18PM (#32582632)
Elapsed time timers start at 0. Time is continuous. The elapsed time being “out of the womb”, that we call “age”, starts near 0. Five minutes after birth, the baby has been in the world for, or it’s age is, five minutes. If someone asked how old a new baby is you could hear “3 weeks”.

Another definition might be from conception. But birth being “one year old” is illogical. The sperm didn’t even exist yet, one year before birth.

Re:Why do arrays start at 0? by xxs on Wednesday August 24, 2022 @02:21PM (#32583639)
Your mistake is using years - use milliseconds (or nanoseconds) when you wish to express a duration. Years don't even have the same duration/length (leap years, and leap seconds)
Re:Why do arrays start at 0? by atwood22 on Wednesday August 24, 2022 @01:11PM (#32582521)
N days or N months depending on how old the baby is.
Re:Why do arrays start at 0? by rcoveson on Wednesday August 24, 2022 @01:30PM (#32582792)
And before an hour has even passed, we'd probably say "minutes old" or perhaps "not even an hour/day old", all to avoid saying "zero days/months/years old". But some might still say zero days old, and they'd be both understood and correct (at least logically if not stylistically). That's the "implicit zero" everybody is talking about. We avoid saying it, but that's just a convention of communcation. Logically it's there. You're zero days old before you're one day old.
Re:Why do arrays start at 0? by randomdata on Wednesday August 24, 2022 @01:15PM (#32582587)
And it turns out that 0 days, 0 months is 0 years.