home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!spool.mu.edu!agate!tfs.com!tfs.com!eric
- From: eric@tfs.com (Eric Smith)
- Subject: Re: Object-Oriented Methodologies - Class Specifications
- Message-ID: <1992Sep7.233327.29906@tfs.com>
- Organization: TFS
- References: <graham.715829976@galois> <1992Sep7.034245.602@tfs.com> <graham.715854518@galois>
- Date: Mon, 7 Sep 1992 23:33:27 GMT
- Lines: 44
-
- In article <graham.715854518@galois> graham@maths.su.oz.au (Graham Matthews) writes:
- >a) I find it very unnatural to think of the relationships between
- >objects as objects. This is why we have two names for the two
- >different ideas.
-
- I think we have dozens of names for them. So what? Maybe we should
- change the terminology to use the word "idea" instead of "object",
- because "object" implies something physical. Then we could call it
- IOP instead of OOP, and people would stop making jokes about how the
- whole thing is a goof, oops.
-
- >
- >b) you assume that the relationships between objects can be modelled
- >using your inheritance structure, or more generally that the
- >mechanism for classifying the types of objects is to be the same
- >mechanism for handling relationships between types. I see no reason
- >to assume that this assumption is true.
-
- For example, a specific relationship is a subclass of relationship,
- because it "is a" relationship. Q.E.D. The same logic carries from
- specific relationships to more specific relationships. e.g., the
- relationship between two animals is a base class of the relationship
- between a bear and a bobcat, because the bear-bobcat relationship
- "is a" two-animal relationship. And the relationship between a bear
- and a salmon is a subclass of the mammal-fish relationship, because
- it "is a" mammal-fish relationship. And the mammal-fish relationship
- itself is a subclass of the two-animal relationship. So you start to
- see a tiny part of a vast inheritance structure of relationships.
-
- Furthermore, program logic fits neatly that way. There are a lot of
- ways mammals in general are related to fish in general, so why repeat
- that program logic for each subclass of that relationship, when you
- can just inherit it from the base class?
-
- >
- >c) if you have a lot of relationships your scheme gets pretty clumsy.
-
- Especially if you try to do it without OOP.
-
- >Moreover many of these relationships are not naturally specified
- >in an inheritance framework.
-
- Prove that by giving a specific example. Or don't bother, because I
- already disproved it above.
-