TDD, as in Type-Directed Development
summary
Argues that replacing some tests with stronger static types catches whole classes of bugs: uses Scala/Haskell idioms (Option/Maybe, newtypes, tagged units), parametricity to derive behavior, and property-based tests as a complement. Demonstrates parsing an HTTP parameter into an int safely, shows compile-errors drive implementation (write types first, follow compiler), cites a multi-day refactor that only needed types and compilation to restore correctness, and points to search-by-type (Scala libraries) and parametricity gives free theorems as practical wins — types as proofs.
AI-written summary · about
chapters (12)
- 0:00Introduction to type-driven
- 2:16Defining types and constraints
- 7:28Correctness by construction
- 10:40Types as design tools
- 14:43Parametricity and generics
- 19:09Avoiding anti-patterns
- 22:36Confidence through types
- 26:31Type-driven development
- 29:37Communication with types
- 32:33Integrating testing strategies
- 36:53Recommended learning resources
- 40:37Q&A on dependent types








