News for hackers. Stuff that matters.
Re:Why do arrays start at 0? by drewzero1 on Wednesday August 24, 2022 @02:46PM (#32583971)
Oddly(?) though, most parents of young children don't refer to a baby as being "zero years old." Rather, we break them down into smaller units: two days old, six weeks old, four months old.
Re:Why do arrays start at 0? by throwaway821909 on Wednesday August 24, 2022 @03:01PM (#32584165)
It helps that change happens particularly fast at that age, so the difference between newborn and 6 months is worth mentioning. Later on the units go up again and we just say "I'm in my 30s" :P

On the other hand a computer/car/house can also be 10 years old but not 0.

Re:Why do arrays start at 0? by samatman on Wednesday August 24, 2022 @08:38PM (#32587824)
Duration only ever departs from 0, it can never arrive there.

That's why zero-based indexing is good!

Re:Why do arrays start at 0? by drewzero1 on Wednesday August 24, 2022 @03:46PM (#32584770)
True, a few weeks can mean a few milestones at that age. It's still wild to me how quickly babies/kids develop. Every week brings new abilities, experiences, and emotions that weren't there before.
Re:Why do arrays start at 0? by wruza on Wednesday August 24, 2022 @06:25PM (#32586616)
On the other hand a computer/car/house can also be 10 years old but not 0

Really? When I buy a new PC, to me it will get 1 year old only after a year. Before that it is just NEW. Is that what you meant?

Re:Why do arrays start at 0? by pvinis on Wednesday August 24, 2022 @10:46PM (#32588818)
Exactly. What we call "new" is the 0th year. It's the same when you start counting seconds. You say "ok counting starts now", then wait a second and say "one", then wait and say "two". Before you say "one", you don't say zero, but it's implied by you waiting a second after you or someone says "go". That's still 0-indexed.