Re: Clean Object Class Design -- Circle/Ellipse
Date: Sat, 4 Aug 2001 19:04:08 -0400
Message-ID: <pj%a7.228$tu.19591215_at_radon.golden.net>
>>>Is it still true that "any model of inheritance in which type
>>>Integer is not considered to be a subtype of type Real
>>>can hardly be said to be a good model of reality" ?
>>
>>Yes. It is still true. All of the operators on Real to yield Real apply
>>equally when one substitutes an Integer for the Real operand, and all of
>>the operators on Real to yield Integer apply equally when one
>>substitutes an Integer for the Real operand.
>
>Closure under operations is only part of the mathematical definition of
>type. A type is defined not only by an underlying set and a set of
>operations, but also by a set of axioms.
>
>Are the integers a subtype of the reals? It depends on which axioms you are
>considering. If you are looking at them as a plain set, monoid or group,
>the answer is yes. If you are looking at them as a field or a real vector
>space, the answer is no.
Doesn't this amount to: If one starts with the axiom that integers are a sub-type of real, they are, and if one starts with the axiom that integers are not a sub-type of real, they are not.
If so, I question the utility of the observation.
The person who determines the types available to the DBMS will necessarily
determine the axioms. In providing support for user-defined types, the DBMS,
itself, should not impose any unecessary axioms on the type system.
>The present discussions has not specified the context. Without the context
However, that is not the question. The real question is: Is an inheritance model that prohibits a model of integer as a sub-type of real a valid model of inheritance?
I fail to see how Date's model of inheritance prevents any type designer
from modelling integers as if they are not sub-types of real.
>>>To put bluntly, " Type Inheritance: Is a Circle an Ellipse?"
>>>documents lack of understanding of types (and OO),
>>>and the usefulness of Date's inheritance model approaches zero.
>>
>>Your statement is not only blunt: It is also an extraordinary statement
>>put it bluntly, it is also incorrect.
>
>Actually, it's neither extraordinary nor incorrect. It all depends on more
>precise definitions of type and OO.
Show me the proof that Date's article documents a lack of understanding of types and OO. Show me the proof that the utility of Date's inheritance model approaches zero. Both are extraordinary, incorrect (and apparently axiomatic) claims. Received on Sun Aug 05 2001 - 01:04:08 CEST
