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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!olivea!inews.Intel.COM!tcad05!bongalon
  2. From: bongalon@tcad05.intel.com (Ben Bongalon)
  3. Newsgroups: comp.object
  4. Subject: Re: Object hidden state and side effects
  5. Message-ID: <BzF6uA.1u3@inews.Intel.COM>
  6. Date: 17 Dec 92 20:13:21 GMT
  7. References: <1992Dec14.112222.13987@kei.is.s.u-tokyo.ac.jp> <1992Dec15.014420.6604@midway.uchicago.edu> <BzBC1L.3GJ@inews.Intel.COM> <1992Dec15.201242.8995@midway.uchicago.edu>
  8. Sender: news@inews.Intel.COM (USENET News System)
  9. Reply-To: bongalon@tcad05.intel.com (Ben Bongalon)
  10. Organization: Intel Corporation, Santa Clara, CA USA
  11. Lines: 102
  12. Nntp-Posting-Host: tcad05
  13.  
  14.  
  15. I wrote:
  16. |> >Frankly I don't understand all the confusion about the distinction
  17. |> >between objects and values.  As i see it, an object may have
  18. internal states; 
  19. |> >more specifically, an object may contain other objects, which 
  20. |> >may in turn be composite (ie, contain other objects) or simple
  21. |> >(ie, just contains values).  But note that simple and composite
  22. |> >objects are merely concepts in our minds.  In order to apply them
  23. |> >to computer programming, we map these objects into variables.
  24. |> >
  25.  
  26. Dave Griffith replied:
  27. |> The distinction between simple and compound is somewhat useful, but has
  28. |> very little to do with the value/object distinction.  
  29.  
  30. My response:
  31.    On the contrary, it does.
  32.    I made the distiction between simple and compound objects to ultimately show
  33.    the relationship between objects and values:  that is, values get  
  34.    assigned to data members of objects.  objects are not actually assigned
  35.    to other objects-- it's the values of their data members that _should_
  36.    get assigned to the corresponding data members of the lvalue object.
  37.  
  38.    The distinction between simple and compound objects allows one to see more
  39.    clearly the recursive application of the object assignment rule.
  40.  
  41.  
  42. Dave:
  43. |> One may have simple
  44. |> objects, with identity but with no internal state.  An example would be 
  45. |> capability tokens in operating system theory.  Atomic and immutable,
  46. |> but also uncopyable, so that equality and assignment must be based on 
  47. |> identity.
  48.  
  49. Me:
  50.    Let's see: "Atomic and immutable, but also uncopyable" ...i agree
  51.    
  52.    "...so that equality and assignment must be based on identity."
  53.    
  54.    I agree with what i think you are trying to say but not on how
  55.    you said it.  A capability token is uncopiable and therefore cannot
  56.    be assigned-- it can only be referenced.  I think the problem lies
  57.    in the overloaded meaning of "assignment".  Similarly, "equality"
  58.    in this case really means "test for identity, or check of Object A
  59.    and Object B are one and the same object".
  60.  
  61.  
  62. Me again:
  63. |> >The primitive objects are the
  64. |> >variables in a program that are defined with primitive data types
  65. |> >(ie, int i, float x, char c    <--- i,x & c are primitive objects).
  66. |> >Composite objects are the variables in a program that are outside
  67. |> >the set of primitive objects.
  68. |> >
  69. |> >An object can be ultimately decomposed into its primitive object 
  70. |> >constituents, and these primitive objects get _values_ assigned to them.
  71. Dave:
  72. |> Far too limited and inflexible, as shown above.
  73.  
  74. My response:
  75.    sorry, my fault...i didn't go far enough.  
  76.    Primitive objects are objects that cannot be further broken down
  77.    into other objects.  They are atomic because:
  78.     a) They are directly mappable into the primitive data structures
  79.        of a language.
  80.        (ie, int i, float x, char c   <--- i,x & c are primitive objects).
  81.   or
  82.     b) They don't have any data members.
  83.        (ie, your capability token example)
  84.  
  85. going back to your example, a capability token cannot be assigned
  86. (ie, copied) because of the "assignment" definition:
  87.  
  88.   Object X = Object Y  means that the values of the data members of Y
  89.     get assigned to the corresponding data members of X.
  90.  
  91.   So if Object Y (and similarly, Object X) have no data members,
  92.   "assignment" is undefined.
  93.  
  94.  
  95. Finally, Dave writes:
  96. |> Intriguing.  It seems as though your defining an object as something which
  97. |> has aliasing semantics for assignment.  It is certainly the case, but it
  98. |> seems a rather process-oriented and rarified starting point for defining 
  99. |> object orientation.  As though you were starting a discussion of lambda 
  100. |> calculus with formal reduction rules, without ever mentioning that your
  101. |> formalism was meant to model something higher-level (mathematical
  102. functions).
  103.  
  104. I think I'm just giving an alternative interpretation (one that works for me,
  105. anyway) of the same concepts and notions about "identity" and "equally" that is
  106. also being discussed in this newsgroup, ie:
  107.  
  108.    Obj A  is equal to Obj B    if   Obj A and Obj B are one and the same object
  109.  
  110. what I added is a methodology of mapping the concept of objects into the data
  111. structures of a language.
  112.  
  113.  
  114. Ben Bongalon 
  115. Intel Corporation
  116.