C compiler written in Python

Paul Rubin http
Thu Jun 3 12:01:07 EDT 2004


claird at lairds.com (Cameron Laird) writes:
> This is *extremely* exciting--at least to me.  I'll try to express
> why I see this as so important.

Well, it's pretty cool anyway, for sure.  I don't see it as a GCC
replacement since it compiles just a C subset, and has to be a lot
slower than GCC.  But yes, it's probably easier to retarget, etc.

> First, many readers probably don't have a full appreciation of
> gcc's defects.  gcc is a wonderful project, and its contributors all
> deserve our appreciation.  It does *not* meet all needs, though: its
> implementation is difficult, portable only with difficulty, bulky,
> and still a poor fit on several architectures.  A compiler that
> invites experimentation, cross-compiling, and is easily installed
> ... well, my head's spinning with ideas.

You might also look at <http://www.tinycc.org>.

> 'Few immediate tangents: everyone read Miki's piece on Python-coded
> *assemblers* <URL:
> http://www.unixreview.com/documents/s=9133/ur0404e/ >?  We all know
> that Python plays nicely with C in that it's easy to make successful
> partnerships between Python- and C-coded modules; such projects as
> Pyrex, Critcl, and Inline:: show the potential for managing these at
> the project level with the higher-level language's power.  Think
> what it means, now, to deepen that integration, so that the compiler
> (or assembler!) itself becomes scriptable!  --

Um, if you want to program in Lisp, why just program in Lisp directly
instead of messing with C and Python?



More information about the Python-list mailing list