home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / object / 4525 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  4.8 KB

  1. Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!ukulele!eaker
  2. From: eaker@ukulele.crd.ge.com (Chuck Eaker)
  3. Newsgroups: comp.object
  4. Subject: Re: Object hidden state and side effects
  5. Message-ID: <1992Dec14.175402.1889@crd.ge.com>
  6. Date: 14 Dec 92 17:54:02 GMT
  7. References: <1992Dec11.163449.18439@crd.ge.com> <1992Dec13.152136.16852@hasler.ascom.ch>
  8. Sender: eaker@ukulele (Chuck Eaker)
  9. Organization: GE Corporate R&D Center
  10. Lines: 100
  11. Nntp-Posting-Host: ukulele.crd.ge.com
  12.  
  13. In article <1992Dec13.152136.16852@hasler.ascom.ch>, steinman@hslrswi.hasler.ascom.ch (Jan Steinman - Bytesmiths, 3946) writes:
  14. |> Oh, sorry for the misunderstanding. Will all C++ compilers that store the
  15. |> value "3/4" in binary form *please* refrain from doing so? Instead, they
  16. |> are to immediately begin using the *real* "3/4" that has been around a long
  17. |> time.
  18.  
  19. The point is that computers cannot use "the *real* 3/4."
  20.  
  21. |> 
  22. |> I don't see the difference between calling "3/4" an object or something else.
  23. |> But let's make it more interesting; let's make it "2/3". In order to properly
  24. |> and accurately represent that in C++, one will have to (oh no!) create an
  25. |> object, since "2/3" has obviously not been around long enough for computer
  26. |> makers to wire it into their architecture!
  27.  
  28. I'm sorry, but I'm afraid I don't see your point. Especially since I am
  29. not aware of any binary representational scheme of real number values which
  30. contains a bit pattern that exactly represents 2/3. Doesn't this show that
  31. the representation is one thing and the value another? That fact that 3/4
  32. can be represented exactly in such schemes does not show that those bit
  33. patterns are identical to the value. There are many instances of those
  34. bit patterns. There is only one instance of the value 3/4.
  35.  
  36. |> 
  37. |> Chuck has simply mistaken one reality (the abstract notion of immutable value)
  38. |> for another (what portion of immutable values computer manufacturers have
  39. |> chosen to model in hardware).
  40.  
  41. My point is that the hardware things are models or representations, not
  42. the values themselves.
  43.  
  44. |> 
  45. |> >In short, software must use objects to represent values.
  46. |> 
  47. |> So far, so good, but...
  48. |> 
  49. |> >This is
  50. |> >why the distinction between values and objects is of enormous
  51. |> >importance. Software objects are used to model real world objects
  52. |> >as well as real world values. Modeling objects with other objects
  53. |> >is far more straight-forward than modeling values with objects.
  54. |> >The field of numerical analysis is all about the difficulties
  55. |> >which arise when one is forced to use objects to represent values.
  56. |> 
  57. |> Huh? Let's replace "object" (a loaded term in this context) with "thing". Let's
  58. |> further agree that a fraction, or an integer, or the set of values "1", "2",
  59. |> and "3", or for that matter, the set of values endorsed by the Republican
  60. |> National Convention, are all "things". None of them *are* the set of binary
  61. |> patterns that represent them in a computer's memory, but must be represented or
  62. |> modelled since they are abstract. Some of them are modelled in hordware, some
  63. |> must be modeled in software.
  64.  
  65. I have no problem with any of this.
  66.  
  67. |> If you accept this premise, do you still insist that it is fundamentally
  68. |> necessary to represent "family values" in a different manner than the values
  69. |> "1 2 3"?
  70.  
  71. Hmmm. I'm not sure I understand the question. If the question is
  72. do I think things which are
  73.  
  74.   1. abstractions, thus
  75.   2. immutable, and
  76.   3. eternal (that they exist is tautologically true)
  77.  
  78. should be represented in a fundamentally different way from things
  79. which are
  80.  
  81.   1. not abstract, hence
  82.   3. have modifiable state, and
  83.   4. can be created and destroyed,
  84.  
  85. then the answer is yes.
  86.  
  87. Integer values are abstractions. So are family values. The values of
  88. good, ok, and bad are all abstractions, immutable and eternal.  Their
  89. representations should reflect these attributes.
  90.  
  91. If marriages are represented with objects and the values of good and
  92. bad are applied to them according to a GOP or any other scheme, make
  93. sure that any instance of marriage can be created, destroyed, or
  94. modified, and that the value good is represented by a single object
  95. which cannot be created, destroyed, or modified.
  96.  
  97. There is a fundamental difference between a data type and an object
  98. class that most languages fail to capture. All the representations of
  99. values represented by a data type are created (specified, etc.) when the
  100. data type is defined. This is not true of the instances of an object
  101. class. We know, in some sense, all the integers and all the colors.
  102. We do not know all the marriages.
  103.  
  104. |> ---
  105. |> : : Jan Steinman, Bytesmiths               steinman@hasler.ascom.ch : :
  106. |> : : 2002 Parkside Court, West Linn, OR 97068-2767 USA        +1 503 657 7703 : :
  107. |> : : Beundenfeldstrasse 35, CH-3013, Bern, Switzerland        +41 31 42 47 11 : :
  108. |> 
  109.  
  110. -- 
  111. Chuck Eaker / P.O. Box 8, K-1 3C12 / Schenectady, NY 12301 USA
  112. eaker@crd.ge.com        eaker@crdgw1.UUCP       (518) 387-5964
  113.