filmov
tv
Introduction to Variance in Scala with Wiem Zine Elabidine - Scala with Friends #1
Показать описание
Here's the first episode in a series of collaborations with excellent developers and speakers from the Scala community.
My first guest is Wiem Zine Elabidine - a backend Scala developer, open source contributor and fellow conference speaker.
In this video, she tells me and you what variance is, what we can do with it, and how the ZIO library uses variance to power type inference in its most common operations.
You can follow Wiem on social media:
If you liked the video, please like and subscribe!
Table of contents:
0:00 - Introduction, welcoming Wiem
0:40 - Subtyping
3:10 - Nothing, Any
4:28 - Case study: common type for generic parameter
5:57 - Upper type bounds
6:39 - Lower type bounds
8:20 - Variance basics
10:28 - Variance as a means to preserve subtyping
11:36 - Making Box contravariant
12:17 - Dual variance of Function1
14:10 - Inverting the variance with type bounds
18:10 - Inverting the variance of a contravariant type
18:48 - How variance composes
20:13 - Variance in ZIO
23:49 - Type bounds in ZIO methods
25:47 - How variance helps us avoid mistakes in design
26:21 - Summary, parting words
Useful links:
Scala documentation:
Other posts:
My first guest is Wiem Zine Elabidine - a backend Scala developer, open source contributor and fellow conference speaker.
In this video, she tells me and you what variance is, what we can do with it, and how the ZIO library uses variance to power type inference in its most common operations.
You can follow Wiem on social media:
If you liked the video, please like and subscribe!
Table of contents:
0:00 - Introduction, welcoming Wiem
0:40 - Subtyping
3:10 - Nothing, Any
4:28 - Case study: common type for generic parameter
5:57 - Upper type bounds
6:39 - Lower type bounds
8:20 - Variance basics
10:28 - Variance as a means to preserve subtyping
11:36 - Making Box contravariant
12:17 - Dual variance of Function1
14:10 - Inverting the variance with type bounds
18:10 - Inverting the variance of a contravariant type
18:48 - How variance composes
20:13 - Variance in ZIO
23:49 - Type bounds in ZIO methods
25:47 - How variance helps us avoid mistakes in design
26:21 - Summary, parting words
Useful links:
Scala documentation:
Other posts:
Комментарии