Kotlin, which is 100% java-interoperable has much nicer generics (declaration-site variance and type projections instead of wildcards).
- Reification
- Declaration-site generics
- Default covariance when variance not specified
- Variance inference!
In practice default covariance is usually the most suitable; it's the pragmatic approach. But you can make a generic type super sound, if that's what you need. And with variance inference your generic type can safely inherit from generic Java types.http://gosu-lang.github.io/2015/11/22/threading-the-needle.h...