lisp scheme lush python etc.
Ian Bicking
ianb at colorstudy.com
Fri Nov 15 21:26:27 EST 2002
On Fri, 2002-11-15 at 15:17, Mike Clarkson wrote:
> What would be really interesting would be a Lython -a Python written
> in Common Lisp, like Jython is written in Java. I think Lisp would be
> as good a language as Java for writing an intepreter, and there might
> be good performance from Lython given the very good native code
> compilers that are available for Lisp.
>
> It would give Lisp another lease on life, would prove the portability
> of Python again, and would expose the Python community to some
> of the first class type inferencing and optimizations made by Lisp
> compilers (for example the compiler called 'Python' in CMU Lisp).
I think you are overestimating the value of a Python port. To me Jython
seems useful strictly because it gives access to the Java world. Unlike
Java, the Lisp world doesn't have a whole lot to offer in the way of
libraries and interfaces.
I would doubt there would be much if any speed improvement in writing a
Lisp interpreter for Python. The current interpreter is written in C,
which optimizes quite nicely. There could be some speed improvement by
*compiling* Python into Lisp. But a great number of the reasons Python
isn't as fast as a fast Lisp has to do with semantic issues -- Python
has certain flexibilities that make it harder to optimize.
But of course it's not impossible to compile into Lisp, perhaps with
some advantages -- but why not introduce those same optimizations Lisp
has into CPython, Psycho, Plex, Numeric, or other Python efforts? I
think that would actually be considerably easier.
Ian
More information about the Python-list
mailing list