MENU

Fun & Interesting

Type Projections... and why they work!

Dave Leeds 4,601 1 year ago
Video Not Working? Fix It Now

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

Comment