why python?

Alex Martelli aleaxit at yahoo.com
Wed Nov 17 02:34:40 EST 2004


99%SugarFree <renee0102 at yahoo.com> wrote:

> Hi,there
> I've just known about Python language recently for a research project.
> I'm just wondering what kind of applications out there using Python??

Hard to think of any kind of app where Python is NOT being used.
Googling for python success stories will show off a few notable cases
(those where developers could be troubled to write things up and their
management gave release etc etc).

> Where can I find more information about  the philosophical, technical and
> design features of Python??

O'Reilly's "Safari" http://search.safaribooksonline.com/ offers two free
weeks -- join and read the first few chapters of "Python in a Nutshell"
and other Python books it stores, it should give an idea well within the
two free weeks.

 
> For those of you who used Python, have you used Prolog or ML??What do u
> think of these 3 language comparing to each other when you are coding?

I've played with them both but not used them in production.  For Prolog,
I was part of the scientific audit team for a project at IBM Research in
the '80s -- being one of the few comfortable with Prolog without being
heart and soul into it, and also familiar with IBM 370 machine
architecture and assembly language (which said research project was
meant to deal with) made me sort of a natural candidate for that audit.

At the time I was impressed by how good prolog was when you were doing
what it was MEANT for, and how bad it suddenly became as soon as you
strayed and started piling up cuts &c to simulate imperative coding.  I
decided I would never have prolog as the ONLY language for a project, to
avoid the latter half.  But then, I've always liked multilanguage
approaches to large programming projects -- "one language to rule them
all" always struck me as silly, from PL/I onwards.

Functional programming is quite a different story.  Though I've never
used it in anger, I _am_ quite convinced that if you can put together a
team of people with PhD in maths or CS for all the development and
maintenance you can probably get more done with it than with languages
that let you take shortcuts by modifying data.  Whether S/ML, O'CAML,
Haskell, Erlang, or other languages yet, best embody that ideal, I can't
claim to know.  In the real world, I believe putting and keeping
together a team of people who are math whizzes IS gonna be a problem.

Python has little to do with Prolog, and not all that much more to do
with FP languages: it took from the latter quite a few ideas and
gadgets, but merged them into its very own style.  You do find yourself
making new objects (e.g. by list comprehension) rather than modidying
old ones, and generating functions on the fly (e.g. by closures), much
more often than with most imperative languages -- but modifying objects
is also quite common (more than even in multi-paradigm O'CAML), emphasis
is on iteration and against recursion (strong iteration protocol,
generators, etc, vs no tail recursion optimization, for example).

What's very surprising is that the various paradigms and ideas merge
pretty seamlessly and elegantly (much more so than in O'CAML, I think,
to give another example of a multi-paradigm language, albeit with a FP
basis at the core).  Strong but highly dynamic (runtime) typing (versus
strictly compile time typing common in FP languages, excepting maybe
Erlang), strong statement/expression distinction, and the various design
philosophies illustrated in the "Zen of Python" which was already quoted
on this thread, merge quite well to yield high productivity, in Python.


Alex



More information about the Python-list mailing list