Are you an EPFL student looking for a semester project?
Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.
This lecture covers the concept of variance in Scala, explaining the relationships between covariant, contravariant, and nonvariant types. It delves into the typing rules for functions, showcasing how they are contravariant in argument types and covariant in result types. The instructor also discusses variance checks, highlighting the importance of proper combinations to avoid unsound operations. Additionally, the lecture explores the implementation of variance in lists, demonstrating how to make classes covariant and the use of lower bounds to ensure variance correctness.