Re: Mixing OO and DB

From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Fri, 15 Feb 2008 21:22:26 +0100
Message-ID: <1pp1pzafeywq5.1n2fatavp4mbc.dlg_at_40tude.net>


On Fri, 15 Feb 2008 08:43:35 -0800 (PST), Marshall wrote:

> On Feb 15, 3:13 am, "Dmitry A. Kazakov" <mail..._at_dmitry-kazakov.de>
> wrote:

>>
>> Ah, this is a crucial point. Circle value is not an ellipse value. These
>> have different types.

>
> You shouldn't let your history with type systems influence your
> thinking to the degree that you say obviously false things like
> "Circle value is not an ellipse value." Such unqualified statements
> obscure rather than illuminate. It would be better to say that
> within a given type system we might give up the mathematical
> fact that a circle is an ellipse in favor of other properties we
> might find more useful.

I don't give up anything. Mathematical "is" merely means that there exists an injective mapping from the set of circles to the set of ellipses. As this stays true for the values, circle is an ellipse. Yet circle value is not an ellipse value. Even after anybody would define an equivalence operation (=) on the corresponding types, they will be of different types. However if your circle and ellipse types are supposed to *model* the corresponding geometrical objects, you certainly will do that, in order to *mean" a geometrical circle when you use a circle value.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Received on Fri Feb 15 2008 - 21:22:26 CET

Original text of this message