`Vector{Float64} <: Vector{Any}` = false, why?

Another thread on why parametric types are invariant: Reason behind designing parametric types as invariant. Note that these covariance and contravariace relations hold:

  • covariance: S <: TP{<:S} <: P{<:T}
  • invariance: S ≠ T ⇒ ¬ P{S} <: P{T}
  • contravariance: S <: TP{>:S} >: P{>:T}
2 Likes