Benefits of moving from Python to Common Lisp?
Kragen Sitaker
kragen at pobox.com
Tue Nov 27 19:02:22 EST 2001
cpr at emsoftware.com (Chris Ryland) writes:
> I went back and forth with Paul a few times re: Lisp vs. Python, and
> in the end the only really serious differences we could come up with
> were
> (a) Lisp's universal (i.e., non-) syntax makes it easy to write
> little languages and to use macros, and
> (b) Lisp compilers exist today
> which produce quite a bit more efficient code than Python's
> interpreter can do. [Forgive me, Paul, if I'm mis-remembering.]
>
> (a) could be tackled, if someone were seriously inclined, by getting
> the Python folks to agree on an intermediate Lisp-like syntax (lists),
We have ASTs and bytecode, and, in fact, there's already a working
macro system in bytecodehacks. But I don't think it will have the
same effect, even if the macro system is incorporated into Python so
you don't have to invoke it explicitly.
> (b) is only a matter of time & will.
I emphatically disagree. Every feature that is added to Python that
is not written in Python is a step backwards for alternative
implementations. And Python seems to be adding new features at a
blistering pace: __slots__, listcomps, augmented assignment operators,
metaclasses, class methods, __get__ and __set__, generators, nested
scopes, types being more like classes, iterators --- the list goes on
and on.
(b) will never happen if features continue accreting at this rate, no
matter how much time and will we put into it; the Python compiler
project will remain as experimental and useless as WINE. Implementing
cool language features in a high-performance compiler is just
inherently more difficult than implementing them in an interpreter.
I wish there were a fast Python compiler, but I don't expect one.
More information about the Python-list
mailing list