Perl Vs Python, Associative arrays, regex, and other considerations.

Greg Ewing (using news.cis.dfn.de) me at privacy.net
Wed Feb 26 20:46:51 EST 2003


John Smith wrote:
> I also wish to get some feedback on things like:
> 
> Cleanless  (I have heard Python to have an advantage there).

That's an understatement!

> Ability to compile, and/or encapsulate the interpreter, in order to have an
> executable, on most platforms.

There are ways of doing this for Python on all the major
platforms, although the methods are different for each
platform.

> Interfacing with other languages and GUI,s

The Python interpreter is designed to be extensible with
modules written in C. Modules are available for many
different GUI libraries, such as GTK, Qt, wxWindows,
Tk. Also native Windows and Mac Toolbox interfaces.
I hear that Cocoa is being worked on.

> Tools: debuggers. A friend told me ddd for Perl is great. How would be
> Python?

Python comes with pdb. I haven't used it much myself,
but it seems to provide all the usual things (set
breakpoints, examine variables, etc.) And it's
written in Python, so if there's something
you want that it doesn't do, you can fix it.:-)

> Ease of leaning (this may be subjective.. transfert of existing knowledge,
> like C or ...).

Very easy, especially if you're already a programmer.
Python syntax will be largely unsurprising to anyone
coming from an Algol-like language (C, Pascal, ...).
Certainly *far* less surprising than Perl's.

On a deeper level, the data model is somewhat like
that of Lisp or Smalltalk (dynamically typed, all
variables hold references to objects, etc.). In
comparison with Perl, it's much more regular, since
any variable can hold a reference to any type of
object.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list