Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.
DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.
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.