open_source_programmers-perl_vs_python

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: open-source-programmer@yahoogroups.com
Subject: Re: [open-source-programmer] fwd: "Why Python?", an article by ESR 

Drew Perttula <drewp@bigasterisk.com> wrote: 

> Here's a good ESR read that expands on some of the Python arguments I
> was trying to make a few weeks ago. Among other points, Eric tells the
> story of why he chose Python (over C and Perl, in particular) for his
> fetchmail GUI configuration tool.
> 
> Full article is at http://www.linuxjournal.com/article.php?sid=3882
>
> "And, most damning of all, the resulting [Perl] code was
> ugly--this matters. Ugly programs are like ugly suspension
> bridges: they're much more liable to collapse than pretty
> ones, because the way humans (especially engineer-humans)
> perceive beauty is intimately related to our ability to
> process and understand complexity. A language that makes
> it hard to write elegant code makes it hard to write good
> code."

Well, here's my stab at a defense of Perl: 

It does not require you to write "ugly" code, (arguably it
*allows* it, which is a different problem, if it's a
problem).

Python on the other hand, does indeed force you to code in a
particular style, and if you don't like it you're hosed.

Myself, in my brief exposure to Python, I wasn't impressed,
if only because of the sheer length of typical blocks of code
compared to equivalent Perl.  One of the big advantages of
Perl, in my opinion, is that you can often express very
complex ideas in a screenful of code.  I'd argue that this
can actually make it easier to follow what's going on.  
Multiple different ways of being able to express an idea do
not strike me as being inherently bad, either.  If you want
to make flat pronouncments about how human minds work, I'd  
say that the example of natural languages shows that people 
like a certain "richness" in their mode of expression. 

CS geeks always seems to be getting lost in a quest for
mathematical elegance, but if you ask me, interesting things
always end up having an element of complexity to them
(e.g. perl, unix, emacs...).  

There's more than one kind of geek out there, and more than
one kind of mind at work writing code, which is something
you might want to keep in mind the next time you're in the
mood to tout something as the perfect way to go because it's
stripped down to "essentials". 


===

To: open-source-programmer@yahoogroups.com
From: Drew Perttula <drewp@bigasterisk.com>
Subject: Re: [open-source-programmer] fwd: "Why Python?", an
Date: Wed, 10 Apr 2002 22:26:12 -0700

[everyone will recognize the start of a language war, and although I
am compelled to respond, I'll try to skip all the usual arguments that
we've all read 1000 times]


> Well, here's my stab at a defense of Perl: 

I'm a perl programmer too. At the meeting a few weeks ago, though, I
was asked (I think) what the advantages of Python were and why I chose
Python for some projects.  ESR's article may contain a little much "one
true language" talk, and I guess it's up to the audience to not be put
off by the favoritism.

I do pick python most of the time that I need bug-free, robust, or
data-structure intensive code. As nice as those attributes sound, for
many of my programs, they are either not priorities or not even relevant.


> not strike me as being inherently bad, either.  If you want
> to make flat pronouncments about how human minds work, I'd  
> say that the example of natural languages shows that people 
> like a certain "richness" in their mode of expression. 

I really like the TMTOWTDI aspect of perl, too, although I have yet
to observe a payoff. I have my favorite idioms and such, and I think
it's neat that I can recognize my own perl code without even looking at
the comments.

The reason people like natural languages, though, doesn't sell me
on a programming language. The freedom of English, I think, helps me
primarily with expressing humor, evoking emotion, controlling emphasis,
and being concise. Only the last two features would seem to have a place
in a computer program.

Also consider the program specs that are supposed to be the English
versions of the programs they describe. A fair amount of my projects
would *benefit* from tighter language in the specs-- a limited language
closer to what you see in legal and military writings. 

===

To: open-source-programmer@yahoogroups.com
From: Drew Perttula <drewp@bigasterisk.com>
Subject: Re: [open-source-programmer] fwd: "Why Python?", an
Date: Wed, 10 Apr 2002 23:27:42 -0700


> Drew Perttula declaimed:
> > I really like the TMTOWTDI aspect of perl, too...
> $ wtf TMTOWDTDI
> Gee...  I don't know what TMTOWDTDI means...
> 
> My wtf database appears to be outdated. Care to explain? 

Perl motto "There's More Than One Way To Do It"

(Google will lead you to much more detail)

===

the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu