|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-14 13:31:33
rwgk_at_[hidden] wrote:
>
> Sorry for the fuzzy terminology. What I meant was simply to
> make Boost.Python compliant with the ISO C++ standard.
> Currently it is unfortunately not. Boost.Python uses
> an "inline friend function" trick to declare & define the
> from_python/to_python converter functions. This approach
> is not compatible with the ISO rules for the lookup of
> friend functions. Fortunately, partial specialization
> can be used to resolve this conflict. We are currently
> working out a new mechanism for implementing the
> converter functions.
I see. It would be good to come close to ISO rules
is possible, although there is one nastiness in Python
which prevents it (the Python 'virtual tables' use
function pointer casts).
But I'm confused when you talk about
inline friend functions, template specialisations,
etc. Why is any of this necessary?
To me, bindings are basically a set of functions.
You could do it all in C. Except there would be nothing
to do, because Python is written in C anyhow :-)
Some advantage can be taken
of C++ features: you'd want to do things like
map STL maps to Python dictionaries, and it would be
nice to model the Python Object Model using classes
with virtual function polymorphism (although it is
quite a nasty problem). It would be nice to automate
ref counting using C++.
Since I've done extensive work binding Python,
I should have a look at the package I suppose, but
Python is quite big, and the prospect has been daunting.
What does the package try to do?
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk