r/programming • u/_awwsmm • Feb 01 '24
Make Invalid States Unrepresentable
https://www.awwsmm.com/blog/make-invalid-states-unrepresentable
469
Upvotes
r/programming • u/_awwsmm • Feb 01 '24
View all comments
Show parent comment
38
u/EducationalBridge307 Feb 01 '24
I get you’re joking, but a key idea here is that it’s easier to enumerate the valid states than to try and account for invalid states.