Jean-Marc Bourguet <>
31 Mar 2002 23:30:46 -0500

          From comp.compilers

Related articles
Multi-method (Jean-Marc Bourguet) (2002-03-31)
Re: Multi-method (2002-04-06)
Re: Multi-method (2002-04-06)
Re: Multi-method (Joachim Durchholz) (2002-04-06)
Re: Multi-method (Jean-Marc Bourguet) (2002-04-07)
Re: Multi-method (Jean-Marc Bourguet) (2002-04-07)
Re: Multi-method (Dmitry A.Kazakov) (2002-04-07)
[2 later articles]
| List of all articles for this month |

From: Jean-Marc Bourguet <>
Newsgroups: comp.compilers
Date: 31 Mar 2002 23:30:46 -0500
Organization: Compilers Central
Keywords: OOP, design, question
Posted-Date: 31 Mar 2002 23:30:46 EST

In all languages supporting OOP, there is a way to make the subroutine
called can depend on the dynamic type of one of its parameter (for
example, in C++, virtual function member). In some (CLOS comes to
mind), it is possible to make the subroutine called on the dynamic
type of several parameters.

In the first case, the use of "vtable" allows to have an efficient way
of making this dispatch, even in the context of separate compilation
(at the cost of constraining the possible types).

Is there such a technique allowing to dispatch on the type of several
        - in time proportionnal to the number of dispatching parameter
        - in such a way that independant compilation is possible.

The use of something like the visitor pattern has the first
characteristic but not the second (you have to know all the possible
types for all the dispatching parameter but one).


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.