Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: What databases have taught me

Re: What databases have taught me

From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Fri, 30 Jun 2006 16:31:25 +0200
Message-ID: <jm1pawbhe3p.1t01j6jz71gi0.dlg@40tude.net>


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.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Received on Fri Jun 30 2006 - 09:31:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US