Re: Clean Object Class Design -- Circle/Ellipse

From: Mikito Harakiri <nospam_at_newsranger.com>
Date: Mon, 06 Aug 2001 21:33:28 GMT
Message-ID: <I2Eb7.848$NJ6.3889_at_www.newsranger.com>


In article <90F5EE465mmeijerixs4allnl_at_194.109.6.74>, Martijn Meijering says...
>
>nospam_at_newsranger.com (Mikito Harakiri) wrote in
><lMBb7.660$NJ6.1929_at_www.newsranger.com>:
>>1. {(1234), (3421), (2134), (4312)} is a subgroup of octic (dihedral)
>>group. Yet, we want to subclass square (octic group) from rectangle (or
>>{(1234), (3421), (2134), (4312)}.
>
>This is all pretty basic stuff, but I'm not an algebra or geometry guy, so
>this has been a while.
>
>If we number the corners of a rectangle as follows:
>
>1 2
>
>4 3
>
>then I think the symmetry group of that non-square rectangle is isomorphic
>with
>
>H={(1)(2)(3)(4), (14)(23),(12)(34)}
>
>and that of the square with
>
>G={(1)(2)(3)(4), (14)(23), (12)(34), (1234), (13)(24), (1432)}
>
>and H is a subgroup of G.

So far so good.

>Are you saying that since every rectangle is a square you would intuitively
>expect it to be the other way around?

Exactly. In other words, when substituting H with G, we notice that any operation that can be applied upon H, could also be applied on G.

Speaking programmatically, G has more operations than H.

>>2. The other way to express the same idea is to say that subclasses
>>inherit symmetries of their ancestors. In that sence we vew subsetting
>>on the set of symmetries, not the universe. Reals is simply more
>>symmetrical class than integers. (Although, Mark is questioning
>>practicality of such conclusion;-)
>
>I'm not sure what symmetries on the reals/integers you are thinking of.

Symmetries are operations that preserve structure. I must admit that #2 is just a fancy way to expess the same idea as in #1. Therefore, don't you think that it's more natural to subclass Reals from Integers? At least we won't get into obvious "missed operation" trap (I mean division). Received on Mon Aug 06 2001 - 23:33:28 CEST

Original text of this message