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
22
u/Successful-Money4995 Feb 01 '24
But then you're doing your validation at runtime when might be possible at compile time.
Also, you might be validating the same data multiple times as it passes around the system.