The Unreasonable Efficiency and Effectiveness of Multiple Dispatch: Your Favourite Examples

Yesn’t. Short version: Both are kinds of polymorphism where a function has multiple methods, though multimethods is only synonymous with multiple dispatch. Function overloading is compile-time polymorphism over compile-time information like types or arity. Multiple dispatch works on runtime information instead and is typically thought to be done at runtime, but Julia’s type inference can resolve dispatch at compile-time, which confuses people used to statically typed languages’ starker divide between static and dynamic.

This is a downside of polymorphism in general, which is why static analysis is such a big want. It’s easier to do by eye in statically typed languages with type declarations, but some rely on type inference, too.

2 Likes