Re: What databases have taught me
Date: Fri, 30 Jun 2006 16:31:25 +0200
Message-ID: <jm1pawbhe3p.1t01j6jz71gi0.dlg_at_40tude.net>
On 30 Jun 2006 00:32:11 -0700, Marshall wrote:
> What do multimethods buy you? If programmer x
It can. The language can statically require the developers to define all
operations [slots in the dispatching table.] For multimethods it is
> 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.
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.
-- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.deReceived on Fri Jun 30 2006 - 16:31:25 CEST
