Re: What databases have taught me

From: Dmitry A. Kazakov <>
Date: Fri, 30 Jun 2006 16:31:25 +0200
Message-ID: <>

On 30 Jun 2006 00:32:11 -0700, Marshall wrote:

> What do multimethods buy you? If programmer x
> entends the operations, and programmer y extends
> the data types, who is going to write the code that
> implements x's operator on y's data type? This problem
> is a fundamental one; it cannot be solved by language
> featues.

It can. The language can statically require the developers to define all operations [slots in the dispatching table.] For multimethods it is statically enforceable. For full multiple dispatch it looks difficult.

I agree with you. IMO, it is a fundamental requirement on a *consistent* multiple dispatch.

Side note: in a strongly typed language "extension" of an operation can be accomplished only through an "extension" of the type (actually a class of). This happens by adding a new type to the class, so that the operation extension be defined on that new type.  

> I'm not familiar with the term "predicate dispatch" but as I
> noted above, pattern matching is roughly the flipside of
> OO's subtyping polymorphism.

True. It does not add any safety, not even a feeling of.

Dmitry A. Kazakov
Received on Fri Jun 30 2006 - 16:31:25 CEST

Original text of this message