Python "why" questions

Mark Lawrence breamoreboy at yahoo.co.uk
Thu Aug 19 00:07:29 CEST 2010


On 18/08/2010 22:47, Russ P. wrote:
> On Aug 18, 2:01 pm, AK<andrei.... at gmail.com>  wrote:
>> On 08/17/2010 10:15 PM, Russ P. wrote:
>>
>>
>>
>>> On Aug 7, 5:54 am, "D'Arcy J.M. Cain"<da... at druid.net>    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.
>>
>>> You're confusing continuous and discrete variables. Time is a
>>> continuous variable, but a list index is discrete.
>>
>>> Take a look at any numbered list, such as the top ten football teams
>>> or the top ten software companies. Have you ever seen such a list
>>> start with zero? If so, where? I sure haven't.
>>
>>> When I studied linear algebra way back, vector and matrix indices also
>>> always started with one, and I assume they still do.
>>
>>> The convention of starting with zero may have had some slight
>>> performance advantage in the early days of computing, but the huge
>>> potential for error that it introduced made it a poor choice in the
>>> long run, at least for high-level languages.
>>
>> Besides that, the way things are now, it's almost an Abbot&  Costello
>> routine:
>>
>> - How many folders are there?
>> - 5
>> - Ok, give me the fourth one.
>> - Here.
>> - No, that's the last one!
>> - That's what you said!
>> - No, I said, fourth one!
>> - That's what I did!
>> - How many are there in all?
>> - I already said, five!
>> - You gave me the last one!!
>> - Just like you said - fourth!!!!
>
> Yes, it's confusing. Which element of a list is the "first" element?
> Wait, "first" is sometimes abbreviated as "1st". So is the 1st element
> the 0 element or the 1 element? I honestly don't know.
>
> Is the top team in the league the number 1 team -- or the number 0
> team? I have yet to hear anyone call the best team the number 0 team!
>
> Unfortunately, we're stuck with this goofy numbering system in many
> languages. Fortunately, the trend is away from explicit indexing and
> toward "for" loops when possible.
>

Bring back Coral 66, all is forgiven.

http://www.xgc.com/manuals/xgc-c66-rm/x357.html

Cheers.

Mark Lawrence.




More information about the Python-list mailing list