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

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!spool.mu.edu!wupost!cs.utexas.edu!torn!nott!cunews!cunews!knight
  3. From: knight@mrco.carleton.ca (Alan Knight)
  4. Subject: Re: Object hidden state and side effects
  5. Message-ID: <knight.725159898@cunews>
  6. Sender: news@cunews.carleton.ca (News Administrator)
  7. Reply-To: knight@mrco.carleton.ca (Alan Knight)
  8. Organization: Carleton University
  9. References: <1992Dec14.175402.1889@crd.ge.com> <1992Dec15.143243.16256@heeg.de> <1992Dec15.224536.13554@crd.ge.com> <BzC05w.2xA@newsflash.concordia.ca> <1992Dec17.001046.27321@crd.ge.com> <knight.724558491@cunews> <BzF7tn.22C@inews.Intel.COM> <knight.724800099@cunews> <BzMnKp.B4J@inews.Intel.COM>
  10. Date: Thu, 24 Dec 1992 01:18:18 GMT
  11. Lines: 45
  12.  
  13. In <BzMnKp.B4J@inews.Intel.COM> bongalon@tcad05.intel.com (Ben Bongalon) writes:
  14. >In article <knight.724800099@cunews>, knight@mrco.carleton.ca (Alan
  15. >Knight) writes:
  16. >|> This seems like an excellent example of what I was talking about. You
  17. >|> apparently do not disintguish between identity and equality for
  18. >|> complex numbers.  If my representation of complex numbers was, for
  19. >|> example, strings, then "1+2i" and "1+2(i^5)" are not in any normal
  20. >|> sense identical, but they are equal.
  21.  
  22. >my question is:
  23.  
  24. >why would you want to consider "i" and "(i^5)" as equal but not
  25. >identical values? Do you consider "1" and "(3-2)" equal but not 
  26. >identical also?  From a pragmatic point of view, the distinction
  27. >between the simplified and unsimplified forms of the expressions 
  28. >seem questionable.
  29.  
  30. If I have non-normalized instances then they are clearly distinct. If
  31. only during the process of normalization, I must consider them as
  32. such, and they must be stored in different places, i.e. not identical.
  33. For the sake of efficiency, I may also wish not to represent all
  34. complex numbers by a pointer.
  35.  
  36. Frankly, I shouldn't care if complex numbers are identical or not. I
  37. don't think identity is a useful operation for them.
  38.  
  39. >|> If I, as a user, type in these two expressions on the keyboard, I
  40. >|> would expect to get separate instances of complex numbers (i.e.
  41. >|> multiple copies) of equal values.
  42.  
  43. >Why? Unless there is a specific need for distinction, I as a user
  44. >would be more interested in the simplified form (ie, the semantic
  45. >definition) of an expression rather.  I don't want to distinguish 
  46. >the _infinite_ number of ways that a value can be represented in.
  47.  
  48. Perhaps you do, perhaps you don't. If you were writing a symbolic
  49. algebra system, you probably would.  You still wouldn't want to
  50. distinguish them by identity, though. 
  51. -- 
  52.  Alan Knight  knight@mrco.carleton.ca  +1 613 788 2600x1027 
  53.  Dept. of Mechanical and Aerospace Engineering              
  54.  Carleton University, Ottawa, Ontario, Canada, K1S 5B6      
  55.  
  56.