perl v python

Tom Bryan tbryan at zarlut.utexas.edu
Sun Apr 25 21:50:47 EDT 1999


"Mark E. Owen" wrote:
> 
> I've been using perl quite some time, just starting looking
> at Python.
> 
> what's peoples views/comparisons of both languages?
> 
> Cheers
> Mark

This comes up often.  You can probably find scores of responses if 
you do a PowerSearch of comp.lang.python at DejaNews.

As a Perl hacker, you might be interested to read what Tom Christiansen
said about the two languages several years ago.
http://language.perl.com/versus/python

Although a lot of time has passed since that message was written, 
it's still a nice, polite, concise summary.  Of course, both 
languages have developed since then.  I think there are many more 
Python users than there were at the time he was writing. 

I originally started using Python at the recommendation of my 
co-workers when I started trying to learn about Perl's references 
so that I could build better data structures for my scripts.  The 
syntax alone was driving me crazy.  I started using Python, and I 
haven't written a Perl program of more than 10 lines since then.
I don't program full time, and Python is simply easier to remember 
when I've been away from the language for a few weeks.

As an extra bonus, I find that I write code that's much easier to 
reuse when I'm writing in Python.  The language really encourages it.
The thing that really motivated me to try Python was when I wrote a 
Perl script that *grew* to over 1000 lines.  I was away from it for 
a while, and then I had to use it again...and modify it.  It took 
me over an hour to figure the code out.  It took me an afternoon
to rewrite so that it could cope with the changes that I needed to 
make.  Nothing like that has happened since I started using Python.

Try it.  You'll like it. :-)

---Tom

P.S. Christiansen's article seems to imply that Python doesn't have
 a variety of ways to accomplish the same task:
 "Another thing people consider a feature in Python over Perl is 
 that no one is ever going to turn around and write the whole thing 
 in an entirely different way as they might in Perl."
 There's more than one way to do it in Python, too.  There just aren't
 so many ways that you always have to delve into some dark corner of
 the language every time you read a different programmer's code. 
 I'm finding that out now as I try to port some old Perl code to 
 Python.

-- 
tbryan at zarlut.utexas.edu
Remove the z from this address to reply.
Stop spam!  http://spam.abuse.net/spam/




More information about the Python-list mailing list