home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / object / 5100 < prev    next >
Encoding:
Text File  |  1993-01-28  |  3.4 KB  |  72 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!ames!sun-barr!cs.utexas.edu!uwm.edu!linac!uchinews!alex!dave
  3. From: dave@alex.uchicago.edu (Dave Griffith)
  4. Subject: Re: Procedures and their instances (objects in traditional OO languages)
  5. Message-ID: <1993Jan27.182208.14843@midway.uchicago.edu>
  6. Sender: news@uchinews.uchicago.edu (News System)
  7. Organization: University of Chicago
  8. References: <PCG.93Jan19235921@decb.aber.ac.uk> <DAVIS.93Jan22105234@passy.ilog.fr> <PCG.93Jan27160420@csthor.aber.ac.uk>
  9. Date: Wed, 27 Jan 1993 18:22:08 GMT
  10. Lines: 60
  11.  
  12. In article <PCG.93Jan27160420@csthor.aber.ac.uk> pcg@aber.ac.uk (Piercarlo Grandi) writes:
  13. >>>> On 22 Jan 93 09:52:34 GMT, davis@passy.ilog.fr (Harley Davis) said:
  14. >
  15. >Davis> In article <PCG.93Jan19235921@decb.aber.ac.uk> pcg@aber.ac.uk
  16. >Davis> (Piercarlo Grandi) writes:
  17. >
  18. >pcg> (Bob Hathaway) said:
  19. >
  20. >   pcg> More precisely objects are values of a procedure instance
  21. >   pcg> (closure/continuation) record type.
  22. >
  23. >   objsys> Since the FAQ will typically be for newcomers, could you
  24. >   objsys> please put the last sentence in English and/or give
  25. >   objsys> references?
  26. >
  27. >pcg> The references are easily produced: "Hierarchical Program
  28. >pcg> Structures", in "Structured Programming", Academic Press, and
  29. >pcg> "Structure and Interpretation of Computer Programs", MIT Press.
  30. >
  31. >pcg> In particular they show that (in class based OO languages) classes
  32. >pcg> are procedures, and objects are procedure instances; closures if
  33. >pcg> the language is a traditional OO one, and continuations if the
  34. >pcg> language is an actor OO one.
  35. >
  36. >Davis> Classes and objects are not procedures;
  37. >
  38. >First, this is not what I wrote; I wrote:
  39. >
  40. >pcg> (in class based OO languages) classes are procedures, and objects
  41. >pcg> are procedure instances
  42.  
  43. [A whole lot of extremely interesting and absolutely correct stuff deleted,
  44.  included stuff from languages most have never even heard of.]
  45.  
  46. We seem to be having some trouble with the verb "are" here.  Bob Hathaway
  47. seems to want it to mean "are best thought of as" and Piercarlo Grandi seems
  48. to want it to mean "are almost always implemented as".  It would strongly 
  49. agree with Bob the objects are _not_ best thought of as procedure instances.
  50. Thinking of them as such introduces implementation detail too early into 
  51. one's thinking about the object-oriented paradigm.  In many ways, this is
  52. similar to Piercarlo's objection to the original FAQ assertion that an object
  53. is a (record) variable.  It may often be implemented as such, but there is 
  54. little good reason to think of them so, unless one is a language designer, 
  55. semanticist, or (possibly) compiler writer. 
  56.  
  57. In the FAQ, objects should probably be described as they are described in 
  58. the _introductory_ literature (Wegner, Booch, etc).  Objects are units of
  59. encapsulation, members of classes, respond to methods, (maybe) created by
  60. constructors, all the usual suspects.  Appending common implementation methods
  61. as possible illustration makes sense, but making them central is likely to
  62. make newcomers think they understand more than they actually do.
  63.  
  64. For discussion, should an introductory Pascal FAQ use the words "stack" or
  65. "heap"?
  66.  
  67. -- 
  68. Dave Griffith, Information Resources, University of Chicago,
  69. Department of Surgery                       dave@alex.bsd.uchicago.edu
  70. When buying and selling are controlled by legislation, the first things bought
  71. and sold are legislators.
  72.