Type Systems — Middle¶
Generics express relationships without losing concrete type information. Subtyping models substitutability; variance controls how generic containers relate. Inference solves constraints but can hide a surprising inferred type. Refinement and effect systems track more specific properties.
Test yourself¶
- Why is mutable collection covariance unsafe?
- What does parametricity guarantee?
- When should a type be explicit?
Continue to senior.md.