Jez Ng Covariance, Contravariance, and super Type Constraints Posted May 28, 2015 Hack has recently enhanced its generics with two features: variance annotations and super type constraints. In this post, I’ll explain how they work and why they were added. Variance Variance describes how the type parameters of a class affect subtyping. For example, consider Vector<T>. Should Vector<int> be a subtyp