[Python-ideas] List Revolution
MRAB
python at mrabarnett.plus.com
Sun Sep 11 02:26:57 CEST 2011
On 10/09/2011 23:34, Guido van Rossum wrote:
[snip]
> Anyway, the reason your proposal is not going to fly, quite apart of
> whether it would be a good idea for a brand new language design(*), is
> that there is over 20 years of existing Python code that would have to
> be changed, not to mention the brains of millions of users, and
> hundreds of books about Python. Plus pretty much every other language
> in widespread use today (C, C++, Java, C#, JavaScript, Ruby, to name a
> few; presumably also Objective C given its C inheritance) agrees that
> indexes start at zero. It is a cultural battle that has been fought
> and won long ago (all the old languages used 1-based indexing:
> Fortran, Algol, Pascal) and it's really not that important in the
> grand scheme of things, so the status quo wins.
>
In Pascal you specify the index range, which can be any enumerated
type, not just integer.
> (*) I personally think 0-based indexing is better, and the referenced
> EWD expresses why better than I could. But I'm sure that if we lived
> in a world where 1-based indexing was the norm I'd get by just fine.
>
More information about the Python-ideas
mailing list