8 ms·
Scala does have wildcard types. List<? super T> is List[_ >: T] List<? extends T> is List[_ <: T] Scala leave a feature out? Psht...always room for one more.
by paulddraper 8y ago
Scala does have wildcard types.
List<? super T> is List[_ >: T]
List<? extends T> is List[_ <: T]
Scala leave a feature out? Psht...always room for one more.
- solidninja 8y agoRight, you can use _ as the placeholder for a type and it works with the bounds syntax. I probably did not make it clear enough - my point was that Java is also not as "simple" (for some definition of "simple" the author could use) as you'd expect. For good reasons too - these bounds are useful to have sometimes!