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 delves into the concepts of subtyping and generics in Scala, exploring how they interact in the context of polymorphism. The instructor explains the relationship between bounds for type variables and the concept of variants, focusing on the most advanced concept of mixing generics and subtyping. The lecture also covers the importance of variance in understanding the interaction between subtyping and type parameters, using examples like arrays and lists to illustrate potential issues and solutions. Additionally, the instructor discusses the Liskoff substitution principle and how it applies to subtyping relationships, emphasizing the significance of precise type descriptions in modeling. The lecture concludes with a practical demonstration of using for expressions to express higher-order functions like map, flatMap, and filter.
This video is available exclusively on Mediaspace for a restricted audience. Please log in to MediaSpace to access it if you have the necessary permissions.
Watch on Mediaspace