[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: So, what the heck is a continuation anyway?

>>>>> "SAJ" == S Alexander Jacobson <alex@shop.com> writes:

  SAJ> Also, for python at least, a translation to scheme does indeed
  SAJ> seem relatively straightforward.

Indeed it seems like an attractive project!

Python has had a single canonical implemenation for most of its
existence.  Jython (formerly know as JPython) changed that a few years
ago, but we haven't seen any other serious attempts at implementation.

The current implementation has a C API that is important -- for
extending Python with new modules written in C and for embedding in
larger C applications.  I don't see a practical way to preserve those
APIs *and* use Scheme as the backend for Python.

On the other hand, an implementation that did not provide
compatibility at the C API and only ran 100% pure Python would be
useful if it offered significantly improved performance.  Can a Scheme
compiler deliver that?  Perhaps.  I'd love to see someone try.

On the third hand, I expect that achieving really good performance
requires somes runtime specialization in the style of Self.  I am not
sure if a what the cost of genering machine code from Scheme from
Python at runtime would be.  Could Proto be implemented with Scheme as
the backend?