La quattordicesima linea di The Zen of Python è un riferimento a Dijkstra?

27

Python's Zen afferma sulla riga 14 che:

Although that way may not be obvious at first unless you're Dutch.

Si tratta di un riferimento al famoso scienziato informatico olandese Edsger W. Dijkstra ?

    
posta SomeKittens 16.05.2012 - 04:05
fonte

2 risposte

43

Although that way may not be obvious at first unless you're Dutch.

si riferisce alla riga precedente:

There should be one-- and preferably only one --obvious way to do it.

E si è sostenuto che si riferisca ai pensieri di Dijkstra sul design del linguaggio espressi in i suoi commenti per la lingua VERDE (una prima ADA):

I thought that it was a firm principle of language design --out of concern for programming as a human activity-- that in all respects equivalent programs should have few possibilities for different representations (possibility for differences ideally not going beyond the arbitrary choice of identifiers and the arbitrary ordering of syntactically unordered components). Otherwise completely different styles of programming arise unnecessarily, thereby hampering maintainability, readability and what have you. This requires from the language designers the courage to make up their minds! The designers of the GREEN language have repeatedly lacked that courage, and have provided multiple ways of doing the same thing.

La citazione è stata utilizzata per punta l'antitesi tra il progetto di Python (C'è un solo modo per farlo) in Perl's ( C'è più di un modo per farlo )

Slogans, semi-official and unofficial:

Perl: "There's more than one way to do it."

"There's more ways to do it than you can remember, probably more than you can even recognize."

Python: "There should be one -- and preferably only one -- obvious way to do it."

At least we tried to pick the right way. (I have seen a progenitor of this remark attributed to Dijkstra: "I thought..." - Edsger W. Dijkstra on GREEN, an early version of Ada)

Ulteriori scavi hanno rivelato questa thread precedente su una mailing list Python , opportunamente chiamato "Dijkstra su Python". Il thread è centrato attorno alla stessa citazione, e le differenze filosofiche tra Python e Perl.

Ma l'olandese è davvero Guido van Rossum, come Tim Peters (autore dello Zen di Python) rivela:

In context, "Dutch" means a person from the Netherlands, or one imbued with Dutch culture (begging forgiveness for that abuse of the word). I would have said French, except that every French person I asked "how do you make a shallow copy of a list?" failed to answer

alist[:]

so I guess that's not obvious to them. It must be obvious to the Dutch, though, since it's obvious to Guido van Rossum (Python's creator, who is Dutch), and a persistent rumor maintains that everyone who posts to comp.lang.python is in fact also Dutch. The French people I asked about copying a list weren't Python users, which is even more proof (as if it needed more).

Or, in other words, "obvious" is in part a learned, cultural judgment. There's really nothing universally obvious about any computer language, deluded proponents notwithstanding. Nevertheless, most of Python is obvious to the Dutch. Others sometimes have to work a bit at learning the one obvious way in Python, just as they have to work a bit at learning to appreciate tulips, and Woody Woodpecker impersonations.

    
risposta data 16.05.2012 - 04:24
fonte
15

Sono abbastanza sicuro che si tratti di un riferimento a Guido van Rossum.

È il creatore e BDFL di Python.

    
risposta data 16.05.2012 - 04:16
fonte

Leggi altre domande sui tag