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

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!johnson
  3. From: johnson@cs.uiuc.edu (Ralph Johnson)
  4. Subject: Re: Object hidden state and side effects
  5. Message-ID: <BzIFGp.K7@cs.uiuc.edu>
  6. Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
  7. References: <1992Dec14.112222.13987@kei.is.s.u-tokyo.ac.jp> <1992Dec15.014420.6604@midway.uchicago.edu> <1992Dec16.65250.10645@kei.is.s.u-tokyo.ac.jp> <1992Dec16.175126.14968@midway.uchicago.edu>
  8. Date: Sat, 19 Dec 1992 14:12:25 GMT
  9. Lines: 35
  10.  
  11.  
  12. In article <1992Dec16.65250.10645@kei.is.s.u-tokyo.ac.jp> jeff@is.s.u-tokyo.ac.jp writes:
  13.  
  14. >I am really at a loss here.  What exactly (in concrete real terms) do
  15. >you expect people to do differently when using true for example once
  16. >it is recognized as a value and not an object?
  17.  
  18. dave@alex.uchicago.edu (Dave Griffith) writes:
  19.  
  20. >Express their actual intent clearly and precisely, without requiring 
  21. >unneccessary contortions to map their intent to a overly limitted language.
  22. >But I've always been a dreamer.
  23.  
  24. This does not seem to me to be an answer "in concrete real terms".
  25.  
  26. The difference between an "object" and a "value" seems to be that for
  27. a value, equality can be implemented by bit comparison of the things,
  28. while objects can only use identity of addresses in memory or else
  29. require a user-supplied function.  Isn't this just a result of immutability?
  30.  
  31. >But most languages have no way to _enforce_ the requirement that they "only
  32. >allow operations that are in line with their essential sameness".  
  33.  
  34. Most languages have no way to enforce anything that is interesting.
  35. We can't really enforce that a subclass provides the same behavior
  36. as a superclass.  In C++, I can enforce that a virtual function will
  37. return an integer, but not a positive integer (except by making a
  38. class for positive integers).  I can enforce that a sort function
  39. take a boolean valued binary function as a parameter, but not that
  40. it provide a total ordering on the collection to be sorted.  We need
  41. to improve the expressive power of our languages.  I think that trying
  42. to solve this problem just by making a value/object distinction is like
  43. applying a bandaid to someone who had a leg cut off.  
  44.  
  45. -Ralph Johnson
  46.