Multiple dispatch
Multiple dispatch is the backbone of the Julia programming language, but the concept dates back to a language called ML, which was devised by Robert Milner et al in 1973 at the University of Edinburgh. Julia has made it one of the main tenets on which the language is designed.
It may be viewed as an example of polymorphism, which allows a language/program to make decisions during runtime on which method is to be invoked based on the types of parameters sent to that method.
The number of parameters used determines the “type” of polymorphism supported by a language. You are likely to be more familiar with single dispatch, which is commonly introduced, occupying a central role of the object orientation paradigm, as seen in Figure 4.1.
Figure 4.1 – Comparison between the single and multiple dispatch paradigms
Function names are usually selected to be descriptive of the function’s purpose. It is sometimes...