C compiler written in Python
Cameron Laird
claird at lairds.com
Thu Jun 3 12:13:11 EDT 2004
In article <7x4qpsvdfg.fsf at ruckus.brouhaha.com>,
Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote:
>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?
Right: I'm for a rich ecology of compilers. I think
the competition does gcc (and others) good. You're
absolutely right that the one at hand is in no way a
unique rival to gcc. I just really, really like that
this one happens to be coded in a language that in-
vites productive experimentation.
Why not Lisp? Also a good question ... probably just
a climate preference.
--
Cameron Laird <claird at phaseit.net>
Business: http://www.Phaseit.net
More information about the Python-list
mailing list