home *** CD-ROM | disk | FTP | other *** search
- From: kers@hplb.hpl.hp.com (Chris Dollin)
- Date: Mon, 25 Jan 1993 11:22:53 GMT
- Subject: Re: Re: FAQ Part 1 (of 2) [ polymorphism or latent typing? ]
- Message-ID: <KERS.93Jan25112253@cdollin.hpl.hp.com>
- Organization: Hewlett-Packard Laboratories, Bristol, UK.
- Path: sparky!uunet!usc!sdd.hp.com!hpscit.sc.hp.com!hplextra!otter.hpl.hp.com!hpltoad!cdollin!kers
- Newsgroups: comp.object
- References: <PCG.93Jan20002119@decb.aber.ac.uk> <1993Jan22.004420.16674@netcom.com> <KERS.93Jan22101155@cdollin.hpl.hp.com> <1993Jan23.0622
- Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
- Lines: 135
- In-Reply-To: objsys@netcom.com's message of 23 Jan 93 06:22:35 GMT
- Nntp-Posting-Host: cdollin.hpl.hp.com
-
- In article ... objsys@netcom.com (Bob Hathaway) writes:
-
- In article ... kers@hplb.hpl.hp.com (Chris Dollin) writes:
- >In article ...Bob Hathaway <objsys@netcom.com> writes:
- >
- > Since Strachey defined parametrically polymorphic
- > functions (functions parameterized by objects of different types), the
- > formal parameters assume many forms and can be referred to as
- > polymorphic.
- >
- >Yes; and formal parameters are not objects. (Digression to meta-discussion
- >about how the compiler might treat the code would be irrelevant.)
-
- Actually, in C++ formals are objects.
-
- We are (as usual) arguing about terminology, then.
-
- Formal parameters are not objects; they are names, standing for [references
- to] objects.
-
- As I already discussed, parameter
- assignment is considered an initialization of a declaration, an object
- declaration.
-
- Yes; this equivalence principle arises by consideration of the \-calculus;
- I first came across it at Oxford, and it has been promoted by Tennant.
- (Tennent? Rats. He did one of the books in the Prentice-Hall series.)
-
- If the declarator specifies a reference or pointer *object*, this
- object is polymorphic.
-
- OK, so that's the way you want to use the term. (Incidentally, C++ seems to
- use the term ``object'' to refer to ``a region of storage''(ARM, p13), so
- I would be wary about using C++ terminology in an OO discussion without
- further clarification.)
-
- If you want to argue that in some languages, such as
- Smalltalk, that names or entities are not objects but denote them, thats a
- subtle difference, since pointers and references (or the names or entities)
- *are* objects in some languages, simply objects that denote other objects.
-
- I wanted to avoid any such argument.
-
- You won't be able to program in languages with pointers if you don't
- understand this.
-
- How fortunate I am, then, to have a proof of my understanding.
-
- Anyway, I see the point that the denoted objects are the
- ones of *primary* interest, and perhaps I should change my definition to
- emphasize that the references are polymorphic and not the interesting (?)
- objects themselves (sorry piercarlo).
-
- That would make your intent clearer, although I sxpect Piercarlo would still
- disagree with you, now for different reasons.
-
- You said:
-
- >I think you're the one inflicting confusing terminology. Everyone in recent
- > history seems to define polymorphism as a property of objects (Stroustrup,
- > Meyer, Booch, ...)
- >
-
- So I said:
-
- >I think this is because you have conflated the notions of ``objects'' and
- >``variable'' (or reference, or pointer, or whatever).
-
- To which you replied:
-
- This is completely wrong because it is out of context.
-
- I don't think so; you were quoting other peoples definitions in support
- of a position that polymorphism was a property of objects, when it was
- clear (to me) that it was *entities* that were polymorphic [could stand
- for objects of different, probably related, classes], and that this was
- true even -- or especially -- when entites and objects were distinct
- kinds of things.
-
- Piercarlo was arguing
- that either procedures (??) or objects "becoming" other objects defines
- polymorphism, and that is what I was disagreeing with.
-
- I understood him to be arguing that *your definition* of polymorphism was
- in terms of ``becomming'' (and I agree that it was) and that this was not
- the notion of polymorphism endemic in the OO world (and I agree with this,
- too). If you change your definition to say that it is the *references*
- that are polymorphic, you have disposed of his first argument, leaving
- only the second (which is now, do we apply the term ``polymorphic'' to
- the methods or the entities? Formally or informally? In all languages
- or not?)
-
- He argued against
- Meyer, Booch, and me completely - names, entities, objects and all - stating
- our intention of polymorphism is wrong and should be referred to instead as
- "latent typing".
-
- I think he was arguing against *your* perception of what polymorphism
- means. I also think he sees many different ways in which the concept of
- polymorphism can be applied, and takes the trouble to distinguish them.
- ``Latent typing'' means that the type of a variable (entity; name;
- whatever) is not fixed at compiletime, but can vary at run-time; the
- actual type belongs to the referenced object.
-
- Languages with latent types (such as Pop, Smalltalk, Lisp) can implement
- polymorphic methods (eg, head, tail, sort) with no additional machinery.
- They can also do things that method-polymorphism cannot.
-
- Languages with method-polymorphism need additional type rules to accomodate
- it. They gain a certain amount of security at the cost of expressiveness.
-
- I hope I've presented enough information to show *we* are
- correct!
-
- No, between you you've presented enough information to show that you-plural
- are in danger of fighting a battle over names.
-
- And his anachronistic views on the functional implementation of the
- object model and then using a functional view of values on top IMHO seems to
- have confused the ganoozga's out of everyone in this newsgroup.
-
- Not everyone.
-
- At least I push the object model [and history has shown both you and
- piercarlo often haven't, if I may take sides].
-
- Why does ``pushing'' the object model have intrinsic value? In our last
- prolonged debate (which I assure everyone I have no intention of
- regenerating) I plumped for pluralism and acknowledging that other
- computational (and world) models had something worthwhile to say. I did
- *not* run down the object model; I was criticising excessive naive
- application of it.
- --
-
- Kers. | "A foolish hobgoblin has the consistency of little minds".
-