home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / object / 4577 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.4 KB  |  32 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!umn.edu!csus.edu!netcom.com!thinman
  3. From: thinman@netcom.com (Technically Sweet)
  4. Subject: Re: Object Relations - was: Re: Object hidden state and side effects
  5. Message-ID: <1992Dec17.184218.28059@netcom.com>
  6. Organization: International Foundation for Internal Freedom
  7. 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>
  8. Date: Thu, 17 Dec 1992 18:42:18 GMT
  9. Lines: 21
  10.  
  11. CLOS, the Common Lisp Object System, uses "generic functions".
  12. I'm sure other object systems do, also.  Under this paradigm,
  13. an object or class is just a data structure with no embedded
  14. methods.  "Generic functions" are separately defined operations
  15. on the structure.  Generic functions can then be defined
  16. that operate on two or more classes.  This is how inter-class
  17. relationships are defined.  You don't say 'this is a vector'
  18. 'this is a matrix', 'gee, I have to put vector*matrix in
  19. one of the two classes and then make them "friends" or make
  20. one a subclass', you just define '*' as a generic function
  21. on vectors and matrices.  
  22.  
  23. The problem is that you lose information-hiding because
  24. you have to make vector and matrix open to the '*' function.
  25.  
  26.  
  27. -- 
  28.  
  29. Lance Norskog
  30.  
  31. Data is not information is not knowledge is not wisdom.
  32.