January 2020
Intermediate to advanced
532 pages
13h 31m
English
It is often difficult to find ambiguous methods until you happen to hit a specific use case at runtime. That's not good. I don't know about you, but software engineers like me don't like surprises in production!
Fortunately, Julia provides a function in the Test package for detecting ambiguities. We can try this out using a similar test. Consider the following code:

We have created a small module in the REPL that defines three foo methods. It's a classic example of ambiguous methods—if we pass two integer arguments, then it is unclear whether the second or the third foo method should be executed. Now, let's use the
Read now
Unlock full access