Summary
In this chapter, we learned about various topics related to subtyping, variance, and dispatch. These concepts are the fundamental building blocks for creating larger, more complex applications.
We first went over the topic of implementation inheritance and behavior subtyping and the differences between them. We reasoned that implementation inheritance is not a great design pattern because of various issues. We came to an understanding that Julia's type system is designed to avoid the flaws that we have seen in other programming languages.
Then, we reviewed different kinds of variance, which are nothing but ways to explain the subtyping relationship between parametric types. We walked through in great details how parametric types are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access