Please enlighten me about PyPy
Steve Holden
steve at holdenweb.com
Thu Dec 22 04:06:32 EST 2005
Kevin Yuan wrote:
>
>
> 21 Dec 2005 19:33:20 -0800, Luis M. González <luismgz at gmail.com
> <mailto:luismgz at gmail.com>>:
>
> ... ...
> This implementation requires a minimal core, writen in a restricted
> subset of python called "rpython". This subset avoids many of the most
> dynamic aspects of python, making it easier to authomatically translate
> it to C through a tool that uses top-notch type inference techniques.
>
>
> Why not directly write the minimal core in C?
>
>
Because then you'd have to maintain it in C. This way, once you have the
first working translator you can translate it into C to improve its
performance, and use it to translate the *next* working translator, and
so on. Consequently your maintenance work is done on the Python code
rather than hand-translated C.
Fairly standard bootstrapping technique, though it's sometimes difficult
to appreciate the problems involved in writing a compiler for language X
in X itself. Typical is the fact that the compiler for version m has to
be written in version (m-1), for example :-)
used-to-do-that-stuff-for-a-living-ly y'rs - steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list