Armored type safety with Iron
summary
Library claim: enforce domain constraints with zero cost, zero dependency using Scala 3 features. Implementation details: composition via a refine-like type operator, opaque types, inlines, and the new macro system, compile‑time refinement for constants and runtime refineEither for inputs, integrations for Cats ZIO tapir circe doobie. Production result: Ledger integrates Iron across services, shrinking runtime bugs and surfacing many errors at compile time while keeping compile latency low.
AI-written summary · about
chapters (13)
- 0:00Welcome
- 1:05Presenters overview
- 2:30Type safety cautionary tale
- 7:37Introducing Iron
- 9:01Compile-time constraints
- 12:57Iron with opaque types
- 14:24Bitcoin Satoshi type example
- 16:51Iron with functional libraries
- 17:53Tag validation example
- 18:56Iron and Doobie integration
- 20:02Doobie integration deep dive
- 23:56Key takeaways
- 25:30Q&A
related talks
30mConstraint Typing with Boolean Algebra
50mReification and type-safety in a CQRS world
49mThe Trouble With Types
44mTelling the Truth with Types
26mRefined, Tailor-Made Types
40mScala vs Idris: Dependent types, now and in the future
50mSimple code for a type safe world
42mLet the Compiler Help You: How to Make the Most of Scala's Type System
