Types Are Not Safe
summary
Claims that types are not safe and that types only prevent a small class of bugs backed by an empirical <5% of defects figure from GitHub. Concrete failures include void/uninhabited types and Haskell examples where impossible constraints compile, type-class induction (servant-style) that builds a printer and an evaluator but yields inscrutable errors reported far from the source, and an endpoint that compiles yet sends empty non-JSON. Proposed alternatives are validators, linters, unit tests, CI performance checks and AI for UI, not deeper type gymnastics.
AI-written summary · about
chapters (21)
- 0:00Type safety misconceptions
- 1:08Types as abstract sets
- 3:14Types prevent errors
- 5:23Types limit error prevention
- 8:11Correctness beyond specs
- 10:39Type level programming pitfalls
- 11:23Uninhabited types dangers
- 14:29Impossible Haskell constraints
- 17:42Type class error reporting
- 20:12Servant API construction
- 22:47Vinyl constraint incoherence
- 24:14Type class selection issues
- 24:58Types and cardinality
- 26:03Servant JSON flaw
- 26:45Types fail for CSS/UI
- 27:48Alternatives to types
- 29:15Beyond type obsession
- 30:37Types never sufficient
- 31:26Type system effectiveness
- 32:31When type level justified
- 33:13Q&A on dependent types
related talks
21mLearning to Love Type Systems
21mBeyond Type Checking Building Bulletproof TypseScript Applications
34mBuilding the systems of tomorrow
21mThe long-tail of type safety
38mType Systems - The Good, Bad and Ugly
49mThe Trouble With Types
22mThink you know TypeScript? Think again.
47mHistory and Philosophy of types
