
Edward Diener wrote:
What is a practical use for multi-methods ?
Multimethods (assuming this library uses the term as it's commonly understood) are like virtual functions that are dispatched on the dynamic types of their arguments as well as the type of *this. You can get this effect through double dispatch, but it requires a bit of plumbing and requires two virtual calls (which for some people is a large amount of overhead). (Of course, multimethods have overhead too.) There's a Stroustrup et al paper on the feasibility of adding multimethods to C++ here: http://research.att.com/~bs/multimethods.pdf . I'm not sure how relevant it is to the current proposal, but it contains information on an experimental implementation that was faster than double dispatch. --Jeffrey Bosboom