Boost logo

Boost :

Subject: Re: [boost] Boost.Multimethod proposal
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-08-22 05:03:40


Nicholas Howe wrote:
> 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?

I'm definitely interested. What is the complexity of calling a
multimethod? Is the code and some examples available somewhere?


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