From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-21 12:07:51
From: "David Abrahams" <dave_at_[hidden]>
> From: "Peter Dimov" <pdimov_at_[hidden]>
> > From: "David Abrahams" <dave_at_[hidden]>
> > > > Where is 'is_polymorphic'? I can't find it in type_traits.
> > >
> > > It's not there. See boost/python/object/inheritance.hpp.
> > Thanks. From a quick glance it seems that inheritance.hpp + related can
> > a good general purpose library.
> When I offered some of these components up 9 months ago there was no
> Maybe I'll try again after 1.29.0 goes out.
> Which components were you thinking would be useful?
I think that most of Boost.Python would be generally useful, except the
parts that are coupled to Python. Some examples:
A CopyConstructible, LessThanComparable type_info is obviously useful. I've
written one three times already.
The machinery in inheritance.hpp, where dynamic typing is emulated with
(void*, typeinfo) pairs, with a mechanism provided to obtain a T* from such
pair, is essential when writing serialization libraries (for example when
auto_ptr<T> is being serialized.)
The registered implicit conversion mechanism is very useful for implementing
any -> any conversions, or a converting any_cast.
A way to register C++ functions and have them callable by name/dynamically
typed argument list (vector<any>, for instance) is often needed. This
allows, for example, attaching a console to a C++ application and allowing
the user to execute commands interactively.
I'm sure there are many more gems in Boost.Python that remain hidden for us
non-Python developers. The best way to separate the general functionality
would be to implement support for one more scripting language and everything
else will kind of fall out :-) but I know that this is a bit idealistic.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk