Switch from perl to python?

Mike Meyer mwm at mired.org
Sat Dec 14 10:19:06 EST 2002


Pekka Niiranen <krissepu at vip.fi> writes:
> I have done several projects with Python myself and
> in each eventually faced the same limitation:
> In order to get the performance, C -extensions were needed.
> The current libraries are not really comprehensive enough, either.
> 
> Now that I have gone thru Paul Graham's
> excellent "ABCI Common LISP" -book
> I see Lisp code all over in Python's buildin
> functions and libraries.

I've heard it claimed that Python is just Scheme with a funny
syntax. Then again, Scheme claims to be Algol with a funny syntax.

I've done systems in Scheme, LISP and Python. I prefer Python. Being
OO all the way down is a major win. I also like the indentation
scheme.

> And concepts like Closures and Macros.. Wow...

A closure is a namespace attached to a bit of executable code. A class
is a namespace attached to multiple bits of executable code. Anything
you can do with a closure, I can do with a class - meaning that it
will look the same to the client code. The reverse is not true.

Python doesn't have macros. On the other hand, looking at the world
through OO glasses rather than S-expression glasses means you don't
need macros as often. But the topic comes up at irregular intervals,
so someone may eventually come up with a way of doing macros in Python
that is right - at which point it'll be added.

As a final comment, from the LISP perspective there are only two
classes of scripting language: LISPs, and poorly implemented LISPs
with studly libraries. Given that, I'll take a LISP with a studly
library. That it has Python syntax just makes it better.

        <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list