Re: [pypy-dev]  Extended goals (was: needed 18 month plan ofwhat we would do in developing PyPy if we got funding .)

Samuele Pedroni pedronis at bluewin.ch
Sat Sep 13 21:41:58 CEST 2003


At 14:51 13.09.2003 -0400, Rocco Moretti wrote:
>Samuele Pedroni <pedronis at bluewin.ch> wrote:
>
> >someone has a large C++ codebase and - yes - he knows it is a pain to
> >maintain and to add new functionality, PyPy-Python seems cool but what can
> >it do for him?
> >
> >1) well he can rewrite all his code in Python
> >
> >  bzzt, wrong answer ( :) )
> >
>
>Or, he could have PyPy rewrite it for him:
>
>If we continue on the track of maximum generality, we should be able to
>hook a C/C++ parser/code generator into the front end of PyPy. And with a
>flexible enough backend, instead of PyPy-Psyco emitting machine code or
>C, it should be able to emit Python code.
>
>The trick is to write such a beast such that comments are preserved and
>the emitted python code is readable.

there is a tension between converting struct/classes to classes vs them
as views on memory regions and access through pointer arithmetic etc...

The lisp machines had a C compiler, using lisp arrays for memory allocation,
but I doubt it tried to produce readable lisp code. And I don't know how
it fared with non-standard-conforming pointer arithmetic and comparisons...

That's why technically, I think, Microsoft invented Managed C++ for .NET 
plus the
capability to still mix and escape to/from non-managed (vanilla) C++.
It's also their way to allow piece-wise conversion.









More information about the Pypy-dev mailing list