[Python-ideas] List Revolution

Carl Matthew Johnson cmjohnson.mailinglist at gmail.com
Sat Sep 10 06:10:41 CEST 2011


On Sep 9, 2011, at 3:32 PM, Matt Joiner wrote:

> Recommended reading:
> http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html

The reasoning in this letter is so terrible. Why do people quote this whenever this comes up? "We should start lists at 0 because when writing for-loops the <= look goofy otherwise." Why on earth should Pythonistas care what the for-loops are like when we only have for-each loops! It's crazy.

Look, EWD was a good computer scientist (=MATHEMATICIAN), but he was terrible when it comes to the ART of programming language design. There's no reason to think that being a good mathematician would make one also good at designing a user interface, and that's what a programming language is--a user interface for highly advanced users. Other than "Go To Considered Harmful" everything I've read of his about programming has been wrong. (Correctness proofs, really?) And much of that wrongness stems from EWD's false belief that programming should be the same as math.

Now, as it happens, I don't think we should change to using 1 (although I do note that Lua gets along fine with it). But the reason not to change is because 0 is a well entrenched standard so most programmers are more used to it than to 1. In other words, it's the standard because in UI design you stick with what your users will expect. It has nothing to do with some arcane mathematician's gobbledygook writings about greater than and less than signs. Programming language design is the art of making something that helps humans work more efficiently, not some pure mathematics descended from Platonic heaven.

Sorry to rant, but that article always comes up and so I have grudge against EWD.


More information about the Python-ideas mailing list