home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!gatech!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
- From: bill@cambridge.apple.COM ("Bill St. Clair")
- Subject: message passing vs. generic functions
- Message-ID: <9208171954.AA05736@cambridge.apple.com>
- Sender: daemon@athena.mit.edu (Mr Background)
- Organization: The Internet
- Date: Mon, 17 Aug 1992 20:57:07 GMT
- Lines: 43
-
- >From: Barry Margolin <barmar@think.com>
- >Subject: R^4RS Authors Comments on Dylan
- >Message-Id: <16ii5eINNonl@early-bird.think.com>
-
- >Regarding the notion of "smart objects" and message passing, we in the CLOS
- >community have basically decided that this is an artificial and restrictive
- >paradigm. We believe that the essence of OO programming is class
- >inheritance and dynamic function dispatching. The notion of
- >object->class->method-table is not necessary for understanding this; it's a
- >useful implementation technique for methods that only specialize on one
- >argument, but it's not the appropriate way to conceptualize things. In
- >particular, it breaks down completely when the choice of implementation
- >technique is based on two parameters (consider output, where the effect is
- >dependent on both the type of object being output and the type of output
- >destination (ASCII terminal, window, or file)).
-
- I hate to open Pandora's box, but since this mailing list is probably
- not read by droves of Smalltalk weenies, I may be able to do so without
- causing a 2 week mail flood. Wish me luck.
-
- I find the CLOS generic function approach to be advantageous to the
- SmallTalk and old Flavors message sending approach for everything but
- one important case: delegation. Sometimes you want to have an object
- that special cases a couple of operations, but sends most of them on
- to another object. Neither CALL-NEXT-METHOD nor NO-APPLICABLE-METHOD
- is a satisfactory solution to this problem, as each must be used on
- a per generic function (or per generic function metaclass) basis and
- the delegating object does not know or want to know the complete set
- of operations likely to be performed on it. The MOP (as defined in
- the AMOP) also cannot solve this problem as the only specializable
- arguments to COMPUTE-EFFECTIVE-METHOD are the generic function and
- the method combination object. None of the arguments is available.
- Only by changing the way that effective methods are computed on a
- system-wide basis is there a hope of providing delegation,
- and this is likely to be difficult to do and non-portable even
- with a standardized MOP.
-
- Said more succinctly, the concept of object delegation is foreign to the
- generic function paradigm. The former is object centric. The latter
- is function centric. The function centric approach is more natural for
- Lisp, but the object centric approach seems more natural to me for
- systems of distributed objects.
-
-