"Justin Johnson" .... > > Well, I think we established that "===" wouldn't work. > > Making multi-dispatch work with class hierarchies could turn out to be very > expensive if done naively. Runtime would potentially have to traverse the > inheritance list of each argument specified, until a matching method was > found supporting arguments of the specified classes. > Maybe a cache could be used that also hashes on the supplied argument > classes list. So generally, the hit is only taken first time round. Yes that is Achilles tendon of the whole mulit-method thing. Theoretically there exist very efficient (complicated) dispatch algorithms http://citeseer.nj.nec.com/ferragina99multimethod.html http://citeseer.nj.nec.com/alstrup01time.html However they might have very large constant time overhead that make them impractical for actual use /Christoph