Re: Clean Object Class Design -- Circle/Ellipse
Date: 25 Jul 2001 13:44:39 -0700
Message-ID: <bdf69bdf.0107251244.2c056242_at_posting.google.com>
marc.gluch_at_mindtap.com (Marc Gluch) wrote in message news:<3b5ad464.1618119793_at_news.grpvine1.tx.home.com>...
> In particular, I was reacting to Date's
> " Type Inheritance: Is a Circle an Ellipse?" ( www.dbdebunk.com),
> where he writes:
> <quote>
> In my opinion, therefore, any "model" of inheritance in which type
> CIRCLE is not considered to be a subtype of type ELLIPSE
> can hardly be said to be a good model of reality.
> ...
> (in Date/Darwen model) the set of update operations that apply to
> circle variables is neither a subset nor a superset of the set of such
> operations that apply to ellipse variables.
> </quote>
>
> Since operations on circles and elipses are hard to agree on
> (in absence of a context of a specific application area and a formal
> specification of these ops), I suggested considering an equivalent
> question of:
> Is IA=<I,{+,*}> a subtype of RA=<R,{+,*}> in the "real" world (math)?
> The "real" world answer is no, but Date's reasoning (?) would lead
> to qualified yes (integers are reals, but the set of update operations
> that apply to integer variables is neither a subset nor a superset of
> the set of such operations that apply to real variables).
Somebody in the other thread noted that subsets in math are defined by predicates over containing set. I have trouble identifying a predicate that selects integers from the set of real numbers. Am I missing something obvious? This is maybe the first indicator that we don't want to inherit integers from reals.
> What does that mean? Are we talking about +, * or := ?
If we take Integer and Real models (not sets) into consideration, is there rigourous definition of subtyping in model terms? Received on Wed Jul 25 2001 - 22:44:39 CEST