TLDR Dev · ARTICLES & TUTORIALS

MAKING ILLEGAL STATE UNREPRESENTABLE

blog.frankel.ch14 min read

Summary from the TLDR Dev newsletter

Static typing is necessary for preventing illegal API state transitions at compile-time, a capability often limited by combinatorial boilerplate in languages like Java or requiring external tools in dynamic Python. Languages like Kotlin, Rust, and Gleam bypass this complexity by using "phantom types" and similar mechanisms.