home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!umn.edu!csus.edu!netcom.com!thinman
- From: thinman@netcom.com (Technically Sweet)
- Subject: Re: Object Relations - was: Re: Object hidden state and side effects
- Message-ID: <1992Dec17.184218.28059@netcom.com>
- Organization: International Foundation for Internal Freedom
- References: <1992Dec13.152136.16852@hasler.ascom.ch> <1992Dec14.112222.13987@kei.is.s.u-tokyo.ac.jp> <1992Dec15.014420.6604@midway.uchicago.edu> <92Dec16.182308.20249@acs.ucalgary.ca>
- Date: Thu, 17 Dec 1992 18:42:18 GMT
- Lines: 21
-
- CLOS, the Common Lisp Object System, uses "generic functions".
- I'm sure other object systems do, also. Under this paradigm,
- an object or class is just a data structure with no embedded
- methods. "Generic functions" are separately defined operations
- on the structure. Generic functions can then be defined
- that operate on two or more classes. This is how inter-class
- relationships are defined. You don't say 'this is a vector'
- 'this is a matrix', 'gee, I have to put vector*matrix in
- one of the two classes and then make them "friends" or make
- one a subclass', you just define '*' as a generic function
- on vectors and matrices.
-
- The problem is that you lose information-hiding because
- you have to make vector and matrix open to the '*' function.
-
-
- --
-
- Lance Norskog
-
- Data is not information is not knowledge is not wisdom.
-