Skip to content

Type Systems Roadmap

"A type system is the most cost-effective unit test you'll ever write." — adapted from Benjamin C. Pierce

This roadmap is about what types actually are, what guarantees they buy you, and how the major mainstream type systems (Go's, Java's, Python's, Rust's, TypeScript's) compare. It's the bridge between everyday API design and the deeper theory that shaped the languages you already use.

Looking for the Clean Code chapter on practical type expressiveness ("make illegal states unrepresentable")? See Clean Code → Generics & Types.

Looking for Go-specific generics? See Golang → Generics.


Why a Dedicated Roadmap

Every senior engineer eventually hits the wall of "I know how to use generics in language X, but I don't know what variance, kinding, or higher-rank types mean." This roadmap fills that gap without leaving the languages you use day-to-day — theory is grounded in Go / Java / Rust / TypeScript code.

Roadmap Question it answers
Clean Code How do I write code that doesn't smell?
Design Patterns What structures recur in OO code?
Type Systems (this) What can the compiler prove about my program before it runs?

Sections

# Topic Focus
01 What Is a Type? Sets of values, tags vs proofs, the Curry–Howard correspondence (briefly)
02 Static vs Dynamic What each style buys you, gradual typing (mypy, TypeScript), hybrid runtimes
03 Nominal vs Structural Java/Rust (nominal) vs Go/TypeScript (structural), pros and cons of each
04 Sum, Product, and Unit Types Records, tuples, tagged unions, why most languages got this half-wrong
05 Generics & Parametric Polymorphism Type parameters, monomorphization vs erasure, the cost models
06 Variance Covariance, contravariance, invariance — why List<Dog> isn't a List<Animal>
07 Bounded Polymorphism Constraints (T: Ord), Go's comparable, Rust traits, Java bounded wildcards
08 Subtyping & Liskov When inheritance is type-theoretically sound, and when it isn't
09 Higher-Kinded Types What Scala/Haskell have and Go/Java don't, and why it matters
10 Dependent & Refinement Types A taste of TypeScript template literal types, Idris, F* — types that depend on values
11 Type Inference Hindley–Milner, Go's limited inference, when inference helps and when it hurts
12 Practical Patterns "Parse, don't validate," newtype/wrapper types, phantom types, the typestate pattern

Languages

Cross-language comparison is the whole point. Examples in Go, Java, Python (mypy / pyright), Rust, and TypeScript — the five mainstream type systems that cover most of the design space.


Status

Structure defined; content pending.


References

  • Types and Programming Languages — Benjamin C. Pierce (the canonical text, "TAPL")
  • Programming Language Pragmatics — Michael L. Scott
  • Alexis King — Parse, Don't Validate (2019)
  • Type-Driven Development with Idris — Edwin Brady

Project Context

Part of the Senior Project — a personal effort to consolidate the essential knowledge of software engineering in one place.