I still get confused with kotlin generics and dele...
# getting-started
s
I still get confused with kotlin generics and delegated properties any good references. I have tried to understand it through official doc but it didn't really helped me so of someone can provide good reference or explain it. <*> projection confuses me
👍 1
m
Those are the best guides I've seen on variance, and would recommend everyone read them.
👍 1
m
Assume you have a Type
Thing<T>
The <*> projection means you neither want to read nor write something with
T
, but you still can use non-generic methods like
size
on
List
which returns just a number.
👍 1
c
How similar is
*
and
Nothing
? In both cases, a function that returns it can't be called
m
If I remember correctly using
*
makes all in usages of the type be
Nothing
and all outs act as
Any?
(or the upper bounds if not the default.
a
@CLOVIS
Star projections
link explain about it