Type System Tips for the Real World
summary
Explains concrete Rust lessons from Diesel: using zero sized types to guarantee compile‑time elimination, replacing boxed recursive enums with generic struct variants to avoid heap overhead, and how monomorphization versus trait objects affects inlining and binary size. Shows a real benchmark where swapping unit for bool causes a 20% loss and demonstrates query construction that the compiler collapses into flat pushes and a single dynamic bind, enabling preparedstatement cache checks and very low runtime cost.
AI-written summary · about
chapters (5)
- 0:00Start
- 0:06Type System Tips for the Real World
- 1:31Programming is full of trade-offs
- 10:28This isn't without tradeoffs
- 15:19A real world example
related talks
26mThe Freedom of Static Typing
19mRust Without Tears: A Guide to Avoiding Common Traps
43mLow-level optimization of algebraic and similar structures
36mThe language that isn't
19mType Theory for the Working Rustacean
31mThe Rust That Could Have Been
49mThe Eternal Sunshine of the Spotless Programming Language
41mFunctional Rust - An Exploration
