home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / object / 4642 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!bernina!neptune!santas
  3. From: santas@inf.ethz.ch (Philip)
  4. Subject: Re: Object hidden state and side effects
  5. Message-ID: <1992Dec23.004259.1076@neptune.inf.ethz.ch>
  6. Sender: news@neptune.inf.ethz.ch (Mr News)
  7. Nntp-Posting-Host: ru8.inf.ethz.ch
  8. Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
  9. References: <1992Dec17.221333.3023@midway.uchicago.edu> <knight.724800436@cunews> <1992Dec20.162050.14652@midway.uchicago.edu>
  10. Date: Wed, 23 Dec 1992 00:42:59 GMT
  11. Lines: 29
  12.  
  13.  
  14. In article <1992Dec20.162050.14652@midway.uchicago.edu> dave@alex.uchicago.edu (Dave Griffith) writes:
  15. >knight@mrco.carleton.ca (Alan Knight) writes:
  16. >>
  17. >>Immutable objects: Have no operations which modify state, but have an
  18. >>identity operation. e.g. non-mutable strings
  19. >
  20. >Might be useful, although the need for an identity operation for non-mutable
  21. >strings escapes me.
  22.  
  23. Usually you want this in order to minimize the storage requirements
  24. of your system. If two equal strings as stored in the same address,
  25. then you spend the half memory for storing them; as bonus, the equality
  26. operation for strings becomes _fast_, and an interpreter which 
  27. uses a plethora of symbols, becomes faster. Some widely used systems 
  28. exploit this technique since the last decade...
  29.  
  30. Philip Santas
  31.  
  32.   "In an evolving universe those who stand still are really moving backwards"
  33. --------------------------------------------------------------------------------
  34. email: santas@inf.ethz.ch                 Philip Santas
  35. Mail: Dept. Informatik                   Inst. of Scientific Computation
  36.       ETH-Zentrum              Swiss Federal Institute of Technology
  37.       CH-8092 Zurich                       Zurich, Switzerland
  38.       Switzerland
  39. Phone: +41-1-2547478
  40.       
  41.  
  42.