On 12/2/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:

> > Regardless, one could take a Pyrex bent on this and having Python-like
> > method declarations but have C as the code body::
>
> (some days, I wonder if we shouldn't just include Pyrex and tell every-
> one to use that for *all* their extension work.  Greg?  how much work
> would it be to equip Pyrex with a "retargetable" backend?)

+1.  Pyrex makes extension writing significantly less painful.
Perhaps the right path would be to add a mode that de-emphasized the
python-compatability aspect of pyrex (automatic python <-> c
conversion points), and added support for some of the things necessary
in c but currently difficult in pyrex (like calling the initialization
macro of a PyCObject).  Add string, list, sequence, dict types, and a
few restrictions (like on overriding built-ins) and you're close to
something that can generate idiomatic c.

Reducing the pyrex magic and adding more detailed errors to the code
generator should eliminate much of the "code-peering" that is
currently necessary (at least, by me) when writing extensions.

regards,
-MIke
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to