3 ms·
In Scala's type system that can be expresses as well - it's called type variance. I believe C#4.0 might be getting this.
by vladev 17y ago
In Scala's type system that can be expresses as well - it's called type variance. I believe C#4.0 might be getting this.
- limmeau 17y agoIn C#4.0, apparently you can declare JOption as interface NOption<out T> { ... } such that NOption<Mysub> is a subtype of NOption<Mysuper>. Still messy to read, though, and C# has ?-types anyway.