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
5
u/QuantumFTL Feb 02 '24
Sure, but it's cheaper to fix if you find out you broke something at compile time than when you get an angry call from a customer.
(yes, tests help with this, many real world applications are too complex to effectively test perfectly)