From: kers@hplb.hpl.hp.com (Chris Dollin)
Newsgroups: comp.object
Subject: Re: O.M(...) vs M(...), and is the Real World O-O?
Date: 28 Aug 92 13:03:16 GMT
Organization: Hewlett-Packard Laboratories, Bristol, UK.

In article ... Bob Hathaway <objsys@netcom.com> writes:

   In article ... bevan@cs.man.ac.uk (Stephen J Bevan) writes:
   >So lets take the CLOS one.  After all, as far as I'm aware it predates
   >both Coplien's and you useage of the term.

   Then we'd be left with the more verbose but precise: "multiply-polymorphic
   methods" terminology.  People might still get confused over whether 
   "methods" referred to CLOS, classical OO or some other kind of method.

So pick a shorter term. Either your technique is the same as CLOS
multi-methods, in which case we'll be happy to use the same term, or it's
different, in which case we'll want a new one. [Well, for ``we'' read ``I'',
and let others have their say.]

If your technique is less general than multi-methods, we could call it
``restricted multi-methods'', ``mini-methods'', ``poly-methods'', ``extended
dispatch'', ``stereo-methods'', ``wide dispatch'', ``smart dispatch'' ... you
get the idea. [After all, the term ``multi-methods'' might initially be taken
to mean that there's more than one method for a given generic function, which
is true (also in conventional OO) and not really the discriminating fact.]

   Anyway, I lookup up multi-methods and found the following quote by David
   Moon:
   "CLOS chose generic functions rather than messages in order to minimize the
   number of new mechanisms added to COMMON LISP."  He goes on to say there is
   no difference between the two approaches and that the CLOS designers simply
   didn't want to divide programs into two parts, an "OO" part and a "function-
   oriented" part.

I *think* you'll find that Moon is referring partly to the syntactic choice,
ie, using ``(method . args)'' rather than ``(send method .args)'' [``send''
might have been spelt ``=>'']. And when he says that ``there's no difference'',
I *think* he means that they'd support the same underlying semantics. Of
course, since you haven't seen fit to tell *us* where this Moon quote comes
from, you've made it unnecessarily difficult for us to read the same paper and
see how it fits.

  CLOS stores methods specialized to a class with that class anyway.

Is this a fact from the same paper, or a guess on your part? Perhaps it's a
useful optimisation, rather than a requirement of CLOS. Perhaps it's a peice of
history dating from earlier implementations. It doesn't tell us what CLOS does
with methods specialised on several classes, either.

I *can* tell you that, to the best of my knowledge, Steve Knight's
``ObjectClass'' for Pop11 [*1], which has CLOS-style multi-methods, does *not*
keep methods specialised on a class ``with'' the class (whatever ``with'' might
mean). So it's hardly a *necessary* property of CLOS-style multi-methods.
[Perhaps it might have something to do with the meta-object protocol, something
about which I claim to know nothing.]




--

Regards,    | "The date of death of a sentient entity must never be
Kers.       | mentioned in a Dirac 'cast." - Blish, ``The Quincunx of Time''.
From: kers@hplb.hpl.hp.com (Chris Dollin)
Date: Wed, 2 Sep 1992 08:09:50 GMT
Subject: Re: O.M(...) vs M(...), and is the Real World O-O?
Organization: Hewlett-Packard Laboratories, Bristol, UK.