Type Projections... and why they work!

Published: 01 January 1970
on channel: Dave Leeds
3,956
292

Let's dive into the world of Kotlin's type projections! We can't always use the `in` or `out` modifiers in a generic class, but don't sweat it - we can still get the generic subtypes we want! This video shows how you can use type projections to get generic subtyping - even for types that are in library code! In less than 9 minutes, you'll learn both how you can use them and why they work.

📘 Kotlin: An Illustrated Guide, Online Edition: https://typealias.com/start
📚 Kotlin: An Illustrated Guide, Leanpub Edition: https://leanpub.com/kotlin-illustrated
✉️ Newsletter: https://newsletter.typealias.com

00:00 Introduction
01:16 Introduction to Type Projections
02:50 Out-Projections
04:16 In-Projections
05:21 Star-Projections
06:53 Type Projections with Library Code
07:21 Conclusion

#Kotlin #TypeProjections #Generics #Programming #AndroidDev #SoftwareDevelopment