Boost logo

Boost :

Subject: [boost] Boost.Multimethod proposal
From: Nicholas Howe (nicholas.howe_at_[hidden])
Date: 2009-08-21 18:28:59

I have written a C++ Multimethod library and propose adding it to Boost. I
see that the addition of such a library to Boost has been proposed in the
past, and been met with relative enthusiasm. However, it has not been done.
 Does anyone know why previous attempts were aborted? I want to be sure
there is a demand before starting the somewhat daunting task of boostifying
and documenting my library.
The library works by requiring clients to register user types of interest,
and specify their public base classes. This allows traversing class
hierarchies at run-time. A multimethod uses this information to perform
run-time overload resolution on registered methods to determine the best
implementation based on the type-id of each parameter. There are no
restrictions on the types of a multimethod's parameters, although only
single indirections to user types will behave polymorphically.

The library is designed to behave well when used by other libraries. To
declare a new method, the client is required to derive a new type from the
multimethod type. This allows multiple multimethods with the same
parameters in different libraries. It also allows encapsulation of each
multimethod implementation within each library, reducing the chance of
conflict between different libraries that were compiled with different
versions of the multimethod library.

Is there any interest in including my library in Boost?

Boost list run by bdawes at, gregod at, cpdaniel at, john at