TLDR Web Dev · OPINIONS & ADVICE

'MAKE INVALID STATES UNREPRESENTABLE' CONSIDERED HARMFUL

links.tldrnewsletter.com12 min read

Summary from the TLDR Web Dev newsletter

The principle of making invalid states unrepresentable in software design is not a good one. State machines, foreign key constraints, and Protocol Buffers are all examples where strict enforcement can lead to complications when dealing with edge cases or schema changes. While constraints are important for reasoning about systems, software should allow for some invalid states to accommodate real-world complexities and avoid rigid, difficult-to-change designs.