Re: Clean Object Class Design -- Circle/Ellipse
Date: Sat, 4 Aug 2001 15:22:40 -0400
Message-ID: <N3Ya7.219$kk6.18971688_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.
Integers may have additional operators and properties that do not apply to
all Reals, which makes Integer a proper subtype of Real.
Quite frankly, I do not think it is Date who misunderstands "type".
>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.