Generic functions

Frank DiCostanzo frdF93@hamp.hampshire.edu
Thu, 20 Jul 1995 21:48:44 -0400 (EDT)


In the misa discussions i think we're seeing closer on whats up with 
generic functions but there are a few critical details missing in our 
understanding that i will try to fix. i noticed that this seems relevant 
to the tunes thread so i'm cross posting.

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?

however, i would argue that above a certain level of abstraction, gf can 
be a very useful tool and should be in any complete object system.  When 
i said that gf have more "location" I was saying that from the 
perspective of the caller.  In my view, location is based on namespace 
which is essentially a cluster of symbol objects.  Whenever one refers to 
a symbol, they are refering to a symbol object in their "workspace" or 
whatever.

now, the only sensible way to do generic functions in my mind would be to 
have distributed definitions. there might be a "core" set of methods that 
several people share, then to modify it, one would create a new gf which 
would refer to the core gf with some new methods which would add to or 
mask the core set, incrementally modifying its behavior.  As i would be 
refering to a generic function through my namespace, using my symbols, i 
would refer to my copy which would then refer to the main copy. i present 
a two level (core vs local) model here for simplicity but i'm sure it 
could be easily seen how this could become a network model so that i 
might refer to several different gf and add my own methods to modify it.

at the user level, this would be as easy as simply defining a new method. 
It would automatically check for an imported reference to a gf then 
create a new local gf, etc.  You can't get to much more abstract than that.

refer to CLOS for specifics on how generic functions/methods  are 
constructed/ used.

 Frank DiCostanzo
 frdF93@hamp.hampshire.edu

At the McDonalds restaurant I did write on the restroom wall,
  "For a good time call swell.hampshire.edu."
		- J.G.