Most probably a stupid question, but I still want to ask

Steven D'Aprano steve at pearwood.info
Sun Apr 10 21:50:18 EDT 2016


On Mon, 11 Apr 2016 08:51 am, Fillmore wrote:

> at which point did the language designers decide to betray the
> "path of least surprise" principle and create a 'discontinuity' in the
> language?

It was March 1996, and I was there. I don't remember the date, I'm afraid.
Some of the core Python developers and users had got together in a trendy
bar in Los Angeles to discuss the future of the language before the 1.0
release. I don't remember the name of the bar, but you had to go down some
steps to get to it from the street (like the one in Cheers), and the
barkeeper was this amazingly entertaining black man in his 40s who kept us
in stitches with his anecdotes and stories about the various places he had
worked before.

Anyway, to get back to the question on hand, we were sitting around
discussing questions about the language. Remember, this was back in the
pre-1.0 days, and there was a *lot* still open for debate:

- case sensitive or insensitive?

- tabs or spaces or both?

- should floats be C singles or doubles?

- use '' for strings or ""?

among others.

I remember Tim Peters, the Timbot, arguing strongly that using doubles was a
waste of time, nobody would ever need that much precision for floating
point calculations, but the rest of us convinced Guido to ignore him.

I don't know who exactly it was that came up with the idea, because I was at
the bar ordering a round of drinks, but when I came back I remember Guido's
words like it was yesterday:

"It's not just enough to betray the principle of least surprise," he said,
and banged his fist on the table in emphasis, "any idiot can design a
surprising language like C. We have to do it in much more subtle way."

Congratulations to Fillmore. It's taken 20 years, but somebody has finally
rumbled to the fact that Python is a joke language! Guido made it all up to
prank people.

I don't think we used the word "troll" back then, but we spent the rest of
the afternoon deciding how we could best troll people with a language which
*seemed* consistent, with a single, coherent programming model, but was
actually a hodge-podge of competing paradigms, inconsistencies and
surprises for the unwary.

I mean, come on guys, in hindsight it should be obvious. Python is a
language that supports three inconsistent language paradigms:

- object oriented
- functional
- procedural

I thought that was too obvious and would give the game away, but Guido was
right. Programmers aren't that bright.

My own contribution to the gag was mutable default function arguments. I'm
really proud of that, because I came up with what seems like a perfectly
sensible and logical explanation for the behaviour, and a name for
it, "early binding", that makes it seem kinda technical and "computer
sciency", but we really added it just to be dicks and annoy folks.

Fillmore, you should feel very pleased with yourself. All the tens of
thousands of Python programmers, and millions of lines of code written in
the language, but nobody until now was able to see what you alone had the
intelligence and clarity of thought to spot. Well done!



-- 
Steven




More information about the Python-list mailing list