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