January 2020
Intermediate to advanced
532 pages
13h 31m
English
The is-a-subtype-of operator, <:, is used to determine whether a type is a subtype of another type. Taking the third example from the preceding section, we can check whether Int is indeed a subtype of Real as follows:

Sometimes the developer may be confused about the usage of the isa and <: operators because they are very similar. We can keep in mind that isa checks a value against a type, and <: checks a type against another type. The document string for these operators is actually quite helpful. From the Julia REPL, type a ? character and enter the operator to find the documentation:
As it turns out, both isa and <: are ...
Read now
Unlock full access