January 2020
Intermediate to advanced
532 pages
13h 31m
English
Julia is a strongly typed language, which means that the programmer has to be very clear about the types being passed around. A function can only be called (also known as dispatched) when the types of its arguments are matched properly. A proper match can be defined as one that matches exactly (same type) or when the argument being passed is a subtype of what is expected in the function's signature.
To illustrate this, let's create a function that doubles the value of its argument of the AbstractFloat type. We will use our subtypetree utility function to quickly find out its subtypes:

What happens ...
Read now
Unlock full access