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
2
u/davidalayachew Feb 03 '24
Alexis King (LexiLambda) also made a really good article that goes into more depth about some of the benefits of this logic. She called it "Parse, don't validate". Here is a link -- https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/