Generic functions

Patrick Premont premont@IRO.UMontreal.CA
Fri, 21 Jul 1995 00:35:06 -0400 (EDT)

Frank DiCostanzo wrote :
> I agree with you completely that the foundation for a distributed object 
> system should be based on a message passing system of some sort.  Generic 
> functions have the problem that they aren't "sent" anywhere so who does 
> the computation? who "owns" the gf?

A generic function is a first-class object, it doesn't have to be
"owned" by any of the objects. Who does the computation ? You can
choose the scheme you want :

- A CPU whose primary memory contains the function (code is probably
more difficult to move than data in a heterogenous network, because of
the need to port it as opposed to changing some byte-ordering for

- The CPU whose primary memory contains the most objects needed in the

- The CPU that minimizes bandwidth on some overloaded link.

- The CPU that minimizes the cost ($).


I still think generic functions are better than message
passing. (it gives cheap generality, modularity and reflexion)