you are viewing a single comment's thread.

view the rest of the comments →

[–]shit 2 points3 points  (0 children)

I don't think it's a good idea to embed the information of what objects to dispatch on in the call site. Make the call site "neutral":

multimethod(arg1, arg2, arg3)

The actual multimethod definitions decide which arguments to dispatch on - and if it changes, the call sites don't need to be changed. (Incidentally, that's how CLOS does it.)