Why is parameter in contravariant position?
This is a fundamental feature of object-oriented programming that doesn’t get as much attention as it deserves. Suppose you have a collection C[+T]. What the +T means is that if U <: T, then C[U] <: C[T]. Fair enough. But what does it mean to be a subclass? It means that every method should work … Read more