Is variance for type type parameters in C # 4.0 one step closer for higher type types?

We know that class implementations are still invariant, even though their interfaces are variants. However, I am wondering if cov / contravariance is a step closer to parametric polymorphism, or are these two separate concepts?

+4
source share
1 answer

Deviation refers to subtyping, not species. However, I think you could use some subtype tricks to get some of the benefits of higher views. I still stick with C # 3, so I have not experimented with this very much, but I certainly plan.

+1
source

Source: https://habr.com/ru/post/1313036/


All Articles