Mainor 2022. Type variance in Java and Kotlin
Channel: Ivan Ponomarev
Date: 2022-05-30

If we compare a program to a building, then program's API is the foundation. It's impossible to underestimate the importance of flexible and convenient APIs for the maintainability of the code. And it's impossible to build such APIs without understanding of how to use type variance in type-parametrized classes and methods.

In this lecture we consider the full evolution of type variance in JVM world, starting from covariant arrays from the very first versions of Java, through Java wildcard types to Kotlin's declaration site and use-site variance. We will move from simple to complex examples to get a steady understanding of how and when to use type variance in your APIs.

Tallinn, May 16th 2022. 

Slides: https://inponomarev.github.io/variance-lecture/#/