Scala Variances: Covariance, Contravariance, and Invariance
Reading Time: 4 minutes 1. Variance Variance is the interconnection of subtyping relationship between complex types and their component types. Variance is all about sub-typing. It tells us if a type constructor is a subtype of another type constructor. Variance defines inheritance relationships of parameterized types(types that have parameters within them). Sub-Typing Every programming language supports the concept of types. Types give information about how to handle values at Continue Reading