Is variance of for generic type parameters in C# 4.0 a step closer for higher kind types?
We know that implementing classes are still invariant, despite the fact that their interfa开发者_如何学编程ces are variant. However I am inquiring, is cov/contravariance a step closer to parametric polymorphism or these are two separate concepts?
Variance is related to subtyping, not really to kinds. That said, I think you might be able to use some subtyping tricks to get some of the benefits of higher kinds. I'm still stuck with C# 3 though, so I haven't experimented with this very much, but I certainly plan to.
精彩评论