Python "why" questions
D'Arcy J.M. Cain
darcy at druid.net
Sat Aug 7 15:53:48 CEST 2010
On Sat, 7 Aug 2010 15:37:23 +0200
Roald de Vries <downaold at gmail.com> wrote:
> > Would said beginner also be surprised that a newborn baby is zero
> > years
> > old or would it be more natural to call them a one year old? Zero
> > based counting is perfectly natural.
> A new born baby is in his/her first year. It's year 1 of his/her life.
> For this reason, also "the year 0" doesn't exist. From the fact that a
> baby can be half a year old, you derive that arrays should have floats
> as indices?
No. You are giving me math and logic but the subject was common
sense. Common usage counts ages as years with the second year called
"one year old" so zero based counting is common. We don't tell Aunt
Martha that little Jimmy is in his third year. We say that he is two
years old and Aunt Martha, a non-programmer, understands exactly what
we mean. Using one-based counting (first year, second year, etc.)
would be the unnatural thing, would confuse Aunt Martha and make her
spoil her apple pie and no one wants that.
D'Arcy J.M. Cain <darcy at druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
More information about the Python-list