Mailing List Archive

perl v python
I've been using perl quite some time, just starting looking
at Python.

what's peoples views/comparisons of both languages?

Cheers
Mark
perl v python [ In reply to ]
On Sun, Apr 25, 1999 at 10:34:34PM +0100, 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
>

greetings,

though perhaps considered a bit dated, I found the following reference on
the python.org site <http://www.python.org/doc/essays/comparisons.html>:

"Python and Perl come from a similar background (Unix scripting, which
both have long outgrown), and sport many similar features, but have a
different philosophy. Perl emphasizes support for common
application-oriented tasks, e.g. by having built-in regular expressions,
file scanning and report generating features. Python emphasizes support
for common programming methodologies such as data structure design and
object-oriented programming, and encourages programmers to write readable
(and thus maintainable) code by providing an elegant but not overly
cryptic notation. As a consequence, Python comes close to Perl but rarely
beats it in its original application domain; however Python has an
applicability well beyond Perl's niche."

there have also been numerous posts on c.l.python regarding this very
topic.. have a look through dejanews.

regards,
J
--
|| visit gfd <http://quark.newimage.com:8080/>
|| psa member #293 <http://www.python.org/>
|| New Image Systems & Services, Inc. <http://www.newimage.com/>
perl v python [ In reply to ]
I believe you may be able to find an analysis on the www.python.org website
giving several links to comparison pages. The pluses for python (IMHO) are :
lends itself to more readable and thus more maintainable code; is easily
usable for programs involving data structures (thus more complicated
programs); has oo constructs from the start so they seem more natural than
Perl's additions. We didn't run into too many problems when converting our
test framework from Perl to Python.

> I've been using perl quite some time, just starting looking
> at Python.
> what's peoples views/comparisons of both languages?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
perl v python [ In reply to ]
"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@zarlut.utexas.edu
Remove the z from this address to reply.
Stop spam! http://spam.abuse.net/spam/