Variance... without Generics!
5.6 هزار بار بازدید -
-
Did you know that you
Did you know that you can use covariance and contravariance in Kotlin without generics? Unlock the mental model of generic variance by first understanding how variance works with regular type hierarchies!
✨ New to Kotlin? Start here: https://typealias.com/start/
... or pick up the new Leanpub Edition! https://book.typealias.com/
🚀 I just launched a new email newsletter!
Sign up here: https://newsletter.typealias.com/
00:00 Introduction
00:35 Upholding the Contract in Subtypes
02:05 Covariance
04:12 Contravariance
06:54 Summary of Variance
07:15 Why Generic Variance Works
08:10 Wrap-up
#kotlin #androiddevelopment
✨ New to Kotlin? Start here: https://typealias.com/start/
... or pick up the new Leanpub Edition! https://book.typealias.com/
🚀 I just launched a new email newsletter!
Sign up here: https://newsletter.typealias.com/
00:00 Introduction
00:35 Upholding the Contract in Subtypes
02:05 Covariance
04:12 Contravariance
06:54 Summary of Variance
07:15 Why Generic Variance Works
08:10 Wrap-up
#kotlin #androiddevelopment
55 سال پیش
در تاریخ 1403/05/28 منتشر شده
است.
5,638
بـار بازدید شده