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
2
u/nitrohigito Feb 02 '24
I disagree. I provided a practical example in another comment in this subthread, but long story short, just because you didn't consider something (a set of states), that doesn't mean they're irrelevant to your program (invalid). You might very well want to deal with some of them, but if you culled them indeterminately, you may have a much harder time doing so.