[Pyrex] Re: Re: Re: Pyrex and C++

Mike Rovner mike at nospam.com
Wed Nov 19 18:03:30 CET 2003


Andreas Kostyrka wrote:
> On Tue, Nov 18, 2003 at 11:47:38PM -0500, David J. C. Beach wrote:
>> However... Pyrex is the only project I'm aware of which allows the
>> user to create an extension type in a language that is much closer to
>> Python.  For a user with a Python background, this is a wonderful
>> thing.

That is true. However it a very dangerous thing.
See http://www.joelonsoftware.com/articles/LeakyAbstractions.html
for example.

> Well, more important, while Boost, SWIG and SIP all allow the
> creation of 1:1 wrappers, Pyrex allows for creating a new interface
> design that builds upon the C library. Basically I can create a
> Python type/class that uses whatever is needed in the underlying
> library to accomplish it's goal.

That is also true for boost to the same extent as for pyrex.

> language, that needs almost zero learning, at least for people
> knowing Python, C well enough (probably a bit knownledge about the
> Python-C API helps too, but it's not necessary).
> That makes C++ support in Pyrex a very important thing.

You didn't mention C++ among skills. I take it you hope to skip
tedious C++ leaning with help of (future) pyrex. Let me disappoint you.
In my experience it will not happen. You'll have to learn C++ hard way.

> BTW, C++ exceptions do not have to propagate trough C modules. It's
> implementation specific.

Any reference, please?

Regards,
Mike







More information about the Pyrex mailing list