[Prev][Next][Index][Thread]

Distributed objects vs. generic functions and multi-methods



I'm a long-time detractor of purely class-based modularity,
preferring the generic functions / multi-methods plus a package
(or module) system to control access.  I have just run upon
some things which are making me do a little reflection...

I've been reading a book ("Enterprise Java Beans", by Richard
Monson-Haefel) which describes the EJB distributed object
architecture.  For the most part, this looks like a pretty good
architecture for doing this sort of thing, though from a client
programmer's point of view, using it is probably kind of a pain
due to Java's lack of good code re-use (multiple inheritance).

What has piqued my curiosity is, what does a good distributed
object system look like in a language in which generic functions
with multi-methods are the things around which designs are
composed?  In a class-based decomposition, there are natural
things which can be "distributed" -- the [instances of the] classes.
In Lisp or Dylan, it's not obvious to me what to "distribute"...
It's not enough to say "oh, just lose the multi-method part and
only dispatch on the first argument", because these languages
still don't provide a formal way of grouping all the related GFs
into a single first-class "protocol".

I'm sure there are people who have thought about this.  I would
be very interested in what ideas you might have.






Follow-Ups: