Communicating in Types
summary
Argues that algebraic types let code communicate real design: shows an OrderResponse ADT with three concrete cases (success, payment-failed, network-error with HTTP status), a real events type encoding heatmap + Stripe workflow, and a refactor turning a vague string->string icon helper into an Icon->Html API in Elm. Demonstrates compiler-inferred types catching a missing NotFound case, splitting createInvoice into fetch (DB read) + render (pure) to make testing easier, and points to Idris for dependent types/state machines.
AI-written summary · about
chapters (8)
- 0:00Introduction and welcome
- 1:04Why types communicate better
- 7:50Algebraic data types explained
- 14:10Describing relationships with functions
- 28:33Describing execution context
- 37:40Decoupling domains with types
- 39:51Languages to explore next
- 41:57Q&A and closing thoughts
related talks
36mCommunicating in Types
39mCommunicating in Types
25mLeveraging (algebraic data) types to make your UI rock solid
34mCommunication, Expression, and Types: Your Compiler as an Ally
52mType-Driven Development with F#
32mCommunicating Intention with Functional TypeScript
30mBetter Code Design with Types and Concepts.
25mLeveraging (algebraic data) types to make your UI rock solid
