Re: On Formal IS-A definition

From: David BL <davidbl_at_iinet.net.au>
Date: Thu, 6 May 2010 22:06:56 -0700 (PDT)
Message-ID: <aa326610-2f26-447a-bd03-08148c36ba14_at_a16g2000prg.googlegroups.com>


On May 7, 9:20 am, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> David BL wrote:
> > On May 6, 9:10 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>
> >>If one is interested specifically in subtypes of supertypes, a proper
> >>subset of a type with a proper superset of operations is a proper
> >>subtype of that type. Thus, circle values are a subtype of ellipse
> >>values and ellipse variables are a subtype of circle variables.
>
> > There is no subtype relationship between ellipse variables and circle
> > variables (in either direction).
>
> > Consider a procedure in an imperative language that is passed a
> > reference to a circle variable. Most generally the variable can be
> > used as an "in-out" parameter, meaning that the variable is both read
> > and written by the procedure. An ellipse variable can only be
> > substituted for out-parameters.
>
> Ellipse variables are a proper subset of the variables where one might
> store a circle,

Elements of sets are values, never variables. You cannot talk about subset relationships between sets of variables because there is no such thing as a set of variables.

>It has a proper superset of the operations permitted for
> circle variables allowing one to also store a non-circular ellipse values.
>
> Saying that one cannot apply circle value operations to ellipse
> variables demonstrates nothing more than a confusion between values and
> variables. One can apply all circle variable operations to ellipse
> variables.

It's not clear to me what is meant exactly by an "operation" that acts on variables instead of values. I would rather use the term "procedure" to avoid confusion with operators in algebraic systems. Even so, I'll drop the scare quotes below...

Why for instance, can't there be an operation that acts on a circle variable to return the radius of the circle value that it currently holds? I presume you would say it is not a valid operation on a variable because otherwise that operation cannot generally be applied to ellipse variables contradicting your last sentence just quoted.

Are you saying that a circle value has a radius, whereas a circle variable does not? Well yes I agree. However, I find it strange to say that there is a dereference operator to read the current value in a circle variable, but you prohibit the operator defined as the composition

  GetRadius o Dereference. Received on Fri May 07 2010 - 07:06:56 CEST

Original text of this message