[pypy-dev] question about core implementation language

Edward K. Ream edream at tds.net
Sun Jan 19 23:16:55 CET 2003


> 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 don't understand Guido's comment.  I personally think Python is absolutely
superb for any prototyping endeavor.

Perhaps I am being dense, but the fact that Python doesn't have feature x of
language y seems totally a non-issue.  You want a switch statement?  Write a
psyco_switch function (in Python, of course). Ditto for anything else your
heart desires.  Eventually _everything_ that generates code is going to
become assembly code, but that is no problem at all for any compiler.

Perhaps I am confusing levels of discussion or implementation.  However, the
way I see it, the most important thing is to do experimentation with
algorithms.  To do that, the essential thing is to compare various ways of
doing things, at as high a level as possible.  In other words, a
psyco_switch routine provides a good enough model for the task at hand.
Ditto for any other construct you want.

Actually, for experimentation (perhaps leading to inspiration) I wouldn't
necessarily confine myself to any particular level of implementation or
design or whatever.  I would simply blast away using whatever language tools
appear to be most useful.  Armin has talked about doing high-level work with
discovering list optimizations, for example.  I don't understand what the
lack of a Python switch statement has to do with such matters.

In short, I would hardly bother at all with questions of the level at which
Python is modeling some implementation.  I would use whatever works in
Python and worry about mapping that back to a final implementation only
after it is clear that Python in Python will be a big win.  At that time we
will have lots more data, energy and incentive to do the needed grunt work.
Until then, I wouldn't let implementation problems get in the way of
invention.

Just my $0.02.

Edward





More information about the Pypy-dev mailing list