[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiple polymorphism / multi-methods
Thanks for the comments. I'll wait for your OOPSLA paper for details.
I like your mental model of multiple polymorphism: sending a message
to all the arguments. Also, multi-methods being "in" all their
arguments rather than just their receiver is a nice use of sharing.
Joseph Pallas recommends distinguishing between normal methods and
polymorphic methods, and I would say that this should be done (if at
all) by marking the arguments to polymorph on. I get the impression
from your comments that you prefer all methods to be multi-methods:
you don't distinguish between "normal" arguments and "polymorphic"
arguments. This would mean that the multi-method is in all (rather
than some) of its arguments. If we assume that most methods polymorph
on the receiver only, it would seem to be desirable to have some
indication where multiple polymorphism is occurring. This could be
the programming environment's job, rather than the user's job. I am
still undecided as to whether or not to mark polymorphic arguments.
- Danny Epstein
dje@scs.carleton.ca