Boost logo

Boost :

Subject: Re: [boost] [multimethods] Proposal: Open Multi-Methods
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-08-31 08:17:00


On 08/31/2013 01:08 PM, Edward Diener wrote:

> The issue seems to be to justify practical use of multi-methods over
> traditional OO programming with virtual functions. Remember that the
> latter has been the core of OO programming for decades. I do not know
> even how to think about designing software using multi-methods as
> opposed to virtual functions. Without some serious practical benefits

The example that Alexandrescu is using in his Modern C++ Design, chapter
11 on multimethods, is collision detection. Here you have objects of
different shapes, such as rectangles and ellipses. Finding the overlap
between two rectangles is different from finding the overlap between
a rectangle and an ellipse. He also covers derived classes and symmetry
(comparing rectangle-ellipse is the same as comparing ellipse-rectangle)


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