Python vs. Perl

Ville Vainio vvainio at karhu.tp.spt.fi
Wed May 23 11:20:23 CEST 2001


Jonathan Gardner <gardner at sounddomain.com> writes:

> Perl. What does Python have that makes it so great? Why should I spend time 
> to become intimate with it? I am looking for comments from people that 
> actually have used Perl or C/C++ extensively, and I am looking for comments 

(I have used C & C++ extensively, some Perl)

When compared with strongly typed langs (c++, Java), you can do the following:

a=getObjectThatSupportsFoo()
a.Foo("there you are")

No need to run around looking for interfaces (implements Foo) or
anything. That can dramatically speed up OO development (especially
since you often don't want to alter the sources that implement your
objects). It's somewhat dirty, though.

As far as Perl goes, the only redeeming feature of perl is the magical
syntax ($_) that can reduce typing for awk-like stuff (it's also one
of the Perls drawbacks). Python is a more "serious", general-purpose
programming language. It has a great standard library, and libaries
are easy to create. When you learn some python (it might take few
hours: don't just read the tutorial, skim through the library
reference as well to see some practical python) you won't want to go
back to perl, esp. if you grok OO concepts.

-- 
Ville Vainio - http://www.tp.spt.fi/~vvainio - ICQ #115524762
 Wild geese have no intention to cast a reflection
 Water has no mind to assume their form




More information about the Python-list mailing list