|
|
|
|
|
by jabl
2071 days ago
|
|
The thing that distinguishes multiple dispatch from single is that you can dispatch based on the types of all arguments to the method, not just one. E.g. you can define function somemethod(x::Int, y::Int) function somemethod(x::Int, y::Float64) function somemethod(x::Float64, y::Float64) Multiple dispatch is available at least in Common LISP, though I guess that's not considered particularly mainstream. |
|
It also exists in R, but again, is optional (and slow), and is therefore mostly unused, which limits its usefulness, making it less used, etc. etc.
In Julia, it is default, so everything participates in multiple dispatch. It completely pervades the language, which is what makes it so useful.