Why use Perl when we've got Python?!

Alex Maranda amaranda at spider.com
Mon Aug 16 05:33:36 EDT 1999


Sam Holden wrote:
> I know a fair few pythoners in fact, I even like some of them. What I meant
> was that anyone who would do such a thing with perl deserves to be killed.
That's the only bit which bothers me; would you put your oppinions in
practice given the chance? (morality and law put aside of course :-)

> Also don't tell anyone but I actually like python a lot. I don't use it much
> since I have more experience with perl, and more importantly I know the
> modules available for perl better, and can quickly search for one to
Get a copy (it's worth printing out, believe me) of the 'Python Library
Reference'.
> do whatever I need next.
That's good to hear. Perhaps you're in the position (or will be in time)
to make a fair comparison between Perl and Python, as coming from an
experienced and unbiased Perl programmer. The same comparison done from
the other side of the mirror (i.e. Python) would be great also. And best
of all, surveys ref what are the language(s) used for and not only how
many people are in each camp...

> >> use impythonate; # STILL NEED THAT ONE SEMICOLON, DAMMIT!
> >>
> >> for $i (1..10)  # COMMENTS ARE OKAY
> >>   print "$i: "
> >>   my $isq =  \
> >>   $i **2 # LINE CONTINUATIONS WORK AS IN PYTHON
> >>   print " $isq\n"
> >>
> >> print "done\n"
> >I know Python fairly well (but I'm no expert) and I can easily read this
> >piece of Perl.
> 
> But it would be no harder to read with ; on the end of each statement and
> a pair of {}s.
Fair enough; the loop is so simple I would understand it in COBOL also
(no, I don't know COBOL :-)

> 
> Working out that strings interpolate should be a bigger leap than working
> out that blocks have {}s around them.
If this all impythonate is doing it's not worth the trouble of course.

> Everyone seems to misunderstand the whole concept of TMTOWTDI. It doesn't
> mean all ways are equal. That is a way of writing perl which works, it is
> however not very maintanable. The only way to determine what syntax is
> valid is to know perl's syntax, and to be able to read and understand the
> impythonate.pm code - since there is no documentation and it is _not_ the
> same as python.
> 
> Writing it in 'normal' perl reduces the requirements to understanding, and
> speeds it up to boot.
Fair enough again; I misread your post (or I read to much into it), and
I thought you're against Python's syntax and whitespace in general. If
it doesn't make sense for Perl, that's fine with me.

> >A couple of days ago I read a bit in Bugzilla's README which amused me:
> >"A computer which doesn't have Perl installed is a very sad computer
> >indeed". Your post is frightening (unless it was a Perl-style joke).
> 
> How was it frightening?
I don't follow comp.lang.perl.* so I don't know what's accepted behavior
there. Imagine my shock when encountering the word 'kill' as punishment
for programming in Python style, when reading my favorite newsgroup.

Regards (no doubts this time),
Alex




More information about the Python-list mailing list