home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!munnari.oz.au!metro!graham
- From: graham@maths.su.oz.au (Graham Matthews)
- Subject: Re: Object-Oriented Methodologies - Class Specifications
- Message-ID: <graham.716171921@galois>
- Sender: graham@maths.su.oz.au
- Nntp-Posting-Host: galois.maths.su.oz.au
- Organization: School of Mathematics and Statistics, University of Sydney
- References: <graham.716002888@galois> <1992Sep9.132319.20201@neptune.inf.ethz.ch> <graham.716087001@galois> <1992Sep10.130743.3819@neptune.inf.ethz.ch>
- Date: Fri, 11 Sep 1992 00:38:41 GMT
- Lines: 51
-
- Graham:
- >To treat a field as a group however I must
- >be able to to throw away an element of my carrier set. Above you
- >describe which operations parameterise a group and a field, but you
- >make no mention of the carrier set. How does the inheritance system
- >know for example which element of the carrier set it must remove to
- >view a field as a group?
-
- (Philip Santas) writes:
- >You do not need to remove anything: Subclasing here is supposed
- >to _inherit_ code and not to remove. The above Field,
- >inherits operations and axioms from two Groups and it may add some
- >more axioms.
-
- I am not talking about code, I am talking about carrier sets. The field
- viewed as a group has to have a different carrier set. How do I specify
- which is the zero element (as this is the one I want to remove).
-
- Graham:
- >>Say I want to say that all rings
- >>are closed and finite (just assume they are). Now do I have to make
- >>some class heirarchy like closed_ring < finite_ring < ring, or perhaps
- >>I should make finite_ring < closed_ring < ring? Whichever I chose
- >>there is an implied order in the class heirarchy that is not in the
- >>mathematics.
- >Normal _multiple_ subclassing is again enough:
- > FiniteSet :< Set
- > Ring :< Set
- > FiniteRing :< FiniteSet /\ FiniteRing :< Ring
- >There is _no_ order in the hierarchy here concerning the class
- >FiniteRing.
-
- Of course there is an order. You have
-
- FiniteRing < Ring < Set
-
- FiniteRing expresses the finite property.
- Ring expresses the closed property.
-
- Why did you not make the heirarchy
-
- Ring < FiniteSet < Set
-
- ie: why did you chose to subclass based on closedness before subclassing
- based on finiteness?
-
- graham
- --
- Graham Matthews And it's true we are immune
- Pure Math, Uni.Sydney, Oz When fact is fiction and T.V. is reality
- graham@maths.su.oz.au
-