home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!gossip.pyramid.com!decwrl!csus.edu!netcom.com!objsys
- From: Bob Hathaway <objsys@netcom.com>
- Subject: Re: Object-Oriented Methodologies - Class Specifications
- Message-ID: <j1kn6ll.objsys@netcom.com>
- Date: Wed, 02 Sep 92 19:57:03 GMT
- Organization: Object Systems
- References: <1992Sep1.220559.10346@m.cs.uiuc.edu> <1992Sep2.140048.11829@bcrka451.bnr.ca> <BtyJK8.GFH@rice.edu>
- Lines: 25
-
- [Please forgive my brief interjection, I haven't been following.]
-
- In article <BtyJK8.GFH@rice.edu> mcw@cs.rice.edu (Michael Wirth) writes:
- >It's very interesting to note how our use of language (both programming and
- >human) influences our thinking. In particular, use of a message passing style
- >of OOP, where methods are "owned" by their target class, leads to the curious
- >asymmetry noted above. In a language, CLOS, which uses generic functions and
- >multi-methods (i.e., which specialize on more than one argument), this
- >asymmetry can be avoided, i.e., we would define a generic function, INTERSECT,
- >which would specialize on both its arguments. One specific method which it
- >would be useful to define then would specialize on lines and circles:
- > INTERSECT((x, LINE) (y, CIRCLE))
-
- In "OOP" the INTERSECT function could be made a "friend" of LINE and CIRCLE
- granting INTERSECT access to both classes without violating a strong form of
- encapsulation. Perhaps "strict OO messaging" could be substituted for "OOP".
- But I'd keep in mind that such implementation access isn't always a good thing.
-
- >Who "owns" this method? Probably some higher level entity, like the "geometry
- >package".
-
- I agree.
-
- bob
- objsys@netcom.com
-