Dijkstra on Python

Carl Banks imbosol at vt.edu
Tue Aug 13 16:52:23 EDT 2002


James J. Besemer wrote:
> 
> Carl Banks wrote:
> 
>> When Perlochists say "there's more than one to do it," they are not
>> saying, "this is how Perl is."  They are saying, "this is what our
>> programming philosophy is."
> 
> No.  They're praising PERL for having so many features.

Well, yes.  Literally.


> Often
> they're furthermore praising a particular developer for coming up
> with a solution the first person had never thought of.
> 
> In any case, the Perl motto is just plain dumb.  Of course there's
> more than one way to do it, so what's the bloody point?

Because it's their philosophy.  They know very well that there is more
than one way to do it in other languages.  When they say, "there's
more than one way to do it," they might be literally praising Perl,
but the underlying subtext is that "having more than one way to do it
is a great thing."  And when you realize this, then their motto starts
making bloody sense.

IOW, you need to stop taking these statements so literally, and think
about what they really mean.


> For Python to respond in kind cheapens the discourse.  It lowers
> us to their level.  It's a cute sound bite and not bad rhetoric but we'd
> do better to rise above it and for the most part simply ignore Perl
> altogether.

Well, I don't take these statements as literally as you do, and I
don't think their underlying meaning is cheap.


>> The fact is, both mottos can apply to both languages.  There certainly
>> is more than one way to do it in Python.
> 
> This was my main point, though I don't agree it's a symmetrical
> relationship.  Perl's motto is more applicable to both languages
> than Python's is to either.

Well, my point was that, since both mottos can apply to both
languages, they aren't meant to describe the languages, per se.

We both agree that both statements apply to both language, and not in
the same degree.  There are two possibilities: that the utterers of
these mottos are "intellectually dishonest" and "cheap" because they
know both mottos apply to both languages yet they utter it as if it
applies uniquely to their own language; or that the motto isn't
intended so much as a description of the languages, but a description
of programming philosopiess (and face it, the mottos don't both apply
equally to Perl and Python community philosophies).

You appear to believe the former possibility; I believe the latter.


[snip]

>> And finally, whether you want to believe it or not, when Pythonistas
>> say "there should be only one obvious way to do it," we really are
>> talking about common idioms like for loops and switch statements.  No
>> one is talking about sets when they say it.
> 
> Then perhaps the motto should be "there's less than 5 ways to do it!"  ;o)
> 
> Seriously, every time I think I maybe found an example, I then realize
> there are 3 or 4 alternatives.  But then, I've only been using Python
> regularly for about 4 years now, so what do I know?
> 
> So.  I challenge y'all to educate me.  Instead of arguing philosophy,
> come up with a concrete list of example problems for which Python
> offers only one obvious solution (and of course show the solution).

You still don't get it.  I will say it one last time: "There should be
one obvious way to do it" *is* philosophy.  You might ignore the fact
that this statement has underlying subtext, but other people
understand this, and it's not ingenuous or wrong of us to use it in
this way.

The real meaning of "There should be one obvious way to do it" is that
the Python community values:
 * Sticking to common idioms
 * Avoiding the use of clever constructions
 * Avoiding coding in a way that requires a reader to "decode" it, if
   it can be avoided

...

It seems to me, James, that you are a down-to-earth, literal person.
Which is perfectly admirable.  But you see, this motto is considered
Python Zen, and let's face it, Zen really isn't for down-to-earth,
literal people.

The motto is simply the Zen-like way of describing the philosophy of
the Python community.  I suggest that, instead of trying to make an
issue out of it, you chaulk up the motto as one of those "cryptic,
backwards sayings that the head-in-the-clouds, Ecstacy-using, Zen
people think are cute."


-- 
CARL BANKS
http://www.aerojockey.com



More information about the Python-list mailing list