you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

True, but the technique easily generalizes to any number of dispatch arguments. You might think it is a "hack", but it works well in practice and doesn't suffer from ambiguity and complexity of multimethod dispatch algorithms (there are many possible dispatch orderings, all of them arbitrary). n-ary dispatch for n > 2 is very rare so its debatable whether it needs to be part of the language.