Ifvwm
06/19/2019, 1:52 AMShawn
06/19/2019, 1:56 AMIfvwm
06/19/2019, 2:25 AMtreatmaster
06/19/2019, 2:52 AMIfvwm
06/19/2019, 5:36 AMSiebelsTim
06/19/2019, 6:09 AMIfvwm
06/19/2019, 6:32 AMSiebelsTim
06/19/2019, 7:28 AMMike
06/19/2019, 12:02 PMextends
or super
. When writing in Java, unless you're very familiar with typing constraints, and what it means to allow variance of types, you REALLY have to think/read about when to use extends
vs super
.
Kotlin is trying to make it easier as one can easily determine if the generic is being used as an in
or an out
by reading the definition class, and can use the appropriate modifier.
Make sense?