Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-10-15 19:01:55


----- Original Message -----
From: "Mark Evans" <mark.evans_at_[hidden]>

> David,
>
> The fortunate thing about open-source projects is that I can
> change the code as I see fit.

Nice, eh ;-)?

> Yes CXX integration would be nice and we may tackle it.

I'd be interested in the results, if you care to share them.
You know, it occurs to me that you will expend much unneccessary effort
using CXX in places where py_cpp applies just as well. In particular,
argument packing/unpacking can amount to a lot of code in a CXX extension
class. Here is the blurb I've written in my documentation re: comparing CXX
and py_cpp:

"Like py_cpp, CXX attempts to provide a C++-oriented interface to Python. In
most cases, like py_cpp, it relieves the user from worrying about
reference-counts. The major difference is that a user's C++ code is still
basically "dealing with Python objects", though they are wrapped in C++
classes. This means such jobs as argument parsing and conversion are still
left to be done explicitly by the user. This is not entirely a bad thing, as
you can do some Pythonic things with CXX (e.g. variable and keyword
arguments) that I haven't yet figured out how to enable with py_cpp. As far
as I can tell, also CXX enables one to write what is essentially idiomatic
Python code in C++, manipulating Python objects through the same
fully-generic interfaces we use in Python. That use is also supported
(less-well) by the py_cpp object wrappers. Paul F. Dubois, the CXX
maintainer, has told me that what I've described is only half of the picture
with CXX, but I never understood his explanation well-enough to fill in the
other half. I hope that you, dear reader, may be able to help me complete my
comparitive analysis of CXX. As far as I can tell, there is no support for
subclassing C++ extension types in Python. "

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk