Re: OON: Interactions between abstract interfaces

From: Chris Myers (myers@tc.cornell.edu)
Date: Thu Apr 01 1999 - 20:10:42 EST


Roscoe,

Have you thought about using the GoF Visitor pattern for this problem?
It is essentially a mechanism for implementing run-time double
dispatch, and achieving polymorphism (externally). Visitor is not a
generic solution, i.e., it is not appropriate for all problems, and I
think it can sometimes be hard to build in after the fact. But you
might want to look at it as an alternative to what you've proposed
so far, if you haven't already done so.

Chris

==========================================================================
Chris Myers
Cornell Theory Center
--------------------------------------------------------------------------
638 Rhodes Hall email: myers@tc.cornell.edu
Cornell University phone: (607) 255-5894 / fax: (607) 254-8888
Ithaca, NY 14853 http://www.tc.cornell.edu/~myers
==========================================================================

On Thu, 1 Apr 1999, Roscoe A Bartlett wrote:

> What I really need is a mechanism for run-time double (multiple) dispatch
> but it would require more development work, more overhead and could not be
> checked by the compiler like virtual functions can be. This is why it was
> not implemented in C++ in the first place but I guess if I really had to I
> could implement it.
>
> Does anyone know of an extendible library that implements multiple
> dispatch in C++? I would love to experiment with it.
>
> Thanks for your comments Steve!
>
> Roscoe Bartlett
>
> --------------------- Object Oriented Numerics List --------------------------
> * To subscribe/unsubscribe: use the handy web form at
> http://oonumerics.org/oon/
> * If this doesn't work, please send a note to owner-oon-list@oonumerics.org
>

--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:08 EST