~/talk

Type Variance in Java and Kotlin

TalkinRussianat Joker 2022 · 2022-11-08..11-19· [java, kotlin]
slides:none on file

Covers variance of generic types on the JVM, tracing its evolution from Java’s covariant arrays and Java wildcard types to Kotlin’s declaration-site and use-site variance. Explains when and how to design flexible, maintainable APIs using covariance and contravariance in classes and methods, with progressively complex examples.

AI-written summary · about

  1. 0:00Introduction
  2. 2:10What is type variance
  3. 8:13Array covariance in Java
  4. 14:14Generic invariance in Java
  5. 23:32Variance in Kotlin
  6. 34:15Contravariance in Kotlin
  7. 39:33PEC S rule in Java
  8. 41:17Java problems and Kotlin solutions
  9. 46:55Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.