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

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!utcsri!newsflash.concordia.ca!grogono
  3. From: grogono@cs.concordia.ca (Peter Grogono)
  4. Subject: Re: Object hidden state and side effects
  5. Message-ID: <BzMpwB.7y3@newsflash.concordia.ca>
  6. Sender: usenet@newsflash.concordia.ca (USENET News System)
  7. Nntp-Posting-Host: concour.cs.concordia.ca
  8. Organization: Computer Science, Concordia University, Montreal, Quebec
  9. References: <BzF7tn.22C@inews.Intel.COM> <knight.724800099@cunews> <BzMnKp.B4J@inews.Intel.COM>
  10. Date: Mon, 21 Dec 1992 21:48:11 GMT
  11. Lines: 22
  12.  
  13. In article <BzMnKp.B4J@inews.Intel.COM> bongalon@tcad05.intel.com (Ben Bongalon) writes:
  14. >
  15. >my question is:
  16. >
  17. >why would you want to consider "i" and "(i^5)" as equal but not
  18. >identical values? Do you consider "1" and "(3-2)" equal but not 
  19. >identical also?  From a pragmatic point of view, the distinction
  20. >between the simplified and unsimplified forms of the expressions 
  21. >seem questionable.
  22.  
  23. It depends what you mean by "pragmatic". It is true that, when we are
  24. thinking informally, there is not much difference between "1" and
  25. "3-2". But there is a vast difference computationally. Many
  26. languages, including Prolog, are formally defined as term languages.
  27. In a term language, "1" and "3-2" are different terms and are thererfore
  28. unequal. A Prolog interpreter needs a simplifier, which would not be
  29. part of a "formal" implementation, to turn one into the other.
  30. The consequence is that arithmetic predicates behave differently
  31. from other predicates, although implementations try to hide this as
  32. much as they can.
  33.  
  34. Peter
  35.