[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple polymorphism / multi-methods
Unfortunately, I don't have time right now to respond to this as I'd like.
But I've been pursuing multiple dispatching versions of Self and Self
successors for a while. I've designed an extension of Self that supports
multiple dispatching (that's partially what the note in the reference manual
is talking about). I've also designed a language different enough from Self
to deserve a new name that also is based on multiple dispatching; I've
submitted a paper on it to this year's OOPSLA.
I disagree that multiple dispatching can't be integrated with the programmer's
existing mental model of what message passing is all about. I view a
message in a multiply-dispatched language to conceptually be sent to all
arguments rather than just the first. Those argument objects get together
and decide how to implement the message. The other half of the mental model is
how it is to build objects with methods in a multiply-dispatched world versus
a singly-dispatched world. I think that the model should be that methods are
still part of objects (e.g. you can go to an object and look at its set of
associated methods); the difference is that a single method may be associated
with more than one object (one object per dispatched argument). I think that
with a suitable programming environment this mental model can be fostered and
it will be just as natural as the current singly-dispatched mental model where
that is appropriate and much more natural where multiple-dispatching is used.
I wish I could talk more.
-- Craig Chambers