home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!convex!news.utdallas.edu!corpgate!bnrgate!bcrka451!bcrki65!sjm
- From: sjm@bcrki65.bnr.ca (Stuart MacMartin)
- Subject: Re: Object-Oriented Methodologies - Class Specifications
- Message-ID: <1992Sep2.135247.11696@bcrka451.bnr.ca>
- Sender: 5E00 Corkstown News Server
- Reply-To: sjm@bcrki65.bnr.ca (Stuart MacMartin)
- Organization: Bell-Northern Research, Ottawa, Canada
- References: <1992Sep1.220559.10346@m.cs.uiuc.edu> <715276480.1.p00058@mail.psi.net>
- Date: Wed, 2 Sep 1992 13:52:47 GMT
- Lines: 38
-
- In article <1992Sep1.220559.10346@m.cs.uiuc.edu>, johnson@m.cs.uiuc.edu
- (Ralph Johnson) writes:
- > [some sentences removed in the following...]
- > Basically, I think your assumption that a Circle shouldn't know
- > anything about a Line is mistaken. If you want to be able to intersect
- > geometric figures, and I claim that is *essential* to the meaning of
- > geometric figures, then you have to be able to compare one with another.
- > This means that you have to have something like intersectLine.
-
- > A Circle should
- > be part of a GeometricObject family of classes. There will be a standard
- > set of operations that all the classes must implement, such as intersecting
- > with a point or another GeometricObject. These classes will be designed
- > as a family and will probably be used as a family. You are unlikely to use
- > a Circle in an application and not use a Line.
-
- Yes, I suppose. But intersectLine??? Do you really support having a
- pair-wise solution? If I want to add another GeometricObject if there are,
- say, 10 already, do I add 10 intersection methods???? What about the
- symmetric intersection methods in the other classes? How do I then find
- the intersection of two arbitrary geometric objects? Must I be able to
- find the types at runtime?
-
- I also disagree that if you use one you will use them all. Consider the
- extreme case of a few basic GeometricObject classes and many exotic ones.
- If I want to use only lines, circles and points in some simple application,
- I don't want my compiling or (especially!) my module size to be
- adversely affected. I have seen cases where using one routine from a
- utility package increased the size of the executable by 50% because of all
- the extraneous junk that was pulled in due to this packaging philosophy.
- Will this happen in your case, or am I unduly worried about a problem that
- doesn't appear in standard OO languages?
-
- Stuart
-
- : Stuart MacMartin email: sjm@bnr.ca :
- : Bell-Northern Research phone: (613) 763-5625 :
- : PO Box 3511, Stn C, Ottawa, K1Y-4H7, CANADA Standard disclaimers apply. :
-