Explores how to make illegal state transitions unrepresentable in a type system using a pizza builder as a model. Compares Python, Java, Kotlin, Rust, and Gleam, demonstrating that static typing is necessary but not sufficient — phantom types combined with extension functions (Kotlin), impl blocks (Rust), or constrained

10m read timeFrom blog.frankel.ch
Post cover image

Sort: