[pypy-dev] question about core implementation language

Christian Tismer tismer at tismer.com
Sun Jan 19 15:28:57 CET 2003


Hi Stephan,

> while reading all these long mails about this exciting project, one basic 
> question came to my mind: why has the core implementation to be in C?

It does not have to.

> Years ago I did a little programming in Objective C and I just loved this 
> language (I'm taking about gcc objc without the framework by NeXT/Apple).
> Here are some good things about Objective C:
> 1. Legal C code is already legal Objective C code
> 2. Objective C has a runtime engine build in.
> 3. objects classes don't need to be known at compile time (just their 
> interfaces)
> 
> Having said that, I could imagine that it's much easier to model python 
> objects in Objective C than in C, thus making the needed core more compact 
> and easier to maintain.

But the idea is to remove C alltogether, maybe keep
it as a target "assembly" language for intermediate
compiler output, and re-write everything in Python,
in a way that a specializing compiler can choke upon.

I have started some prototyping in Python, and I now
remember some words of Guido, that Python isn't specially
well suited for such a task. I admit, there is some
truth in it.
I'm sticking with the approach, but I have to fight
the wish for a simpler mapping from C to Python.
Some primitive sub-language with direct access to
primitive objects by type declarations whould
make life easier.
But we don't want to change the language now, and
I try to express everything by objects, which contain
the necessary "hints". No idea if this is the
concept that finally survives.

My vision is that in a sprint, we do a Python interpreter
rather quickly and then start to re-implement the
basic objects. The resulting code should look improved,
not worse. I have not much practice, yet. I will try
a few approaches and post them for discussion.

cheers - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/




More information about the Pypy-dev mailing list