
On Sat, Aug 22, 2009 at 10:40 PM, Kim Barrett<kab.conundrums@verizon.net> wrote:
At 11:58 PM -0400 8/22/09, Edward Diener wrote:
This does not explain the practical purpose of multimethods. I know what virtual functions are, of course. What in multimethods improves on the polymorphic capabilities of virtual functions that make them a practical choice for use over normal polymorphism.
The previously referenced paper (http://research.att.com/~bs/multimethods.pdf) contains rationale discussion, including several well chosen examples where multiple dispatch can be beneficial.
To be blunt though, Virtual Methods are not proper OO, multimethods are proper OO. C++ has been lacking in this, sometimes important area of OO, where things like LISP do wonderfully. Hmm, I know LISP has a well optimized multimethod implementation written in pure LISP, wonder how easily that method could be transferred to C++, although more verbose...