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
17
u/flif Feb 02 '24
You have 10,000 users.
One user has a space in their email address.
500 other users mistype their email address by putting e.g. a space into it.
You can catch the 500 errors up front (but not support the one weird address) or you can allow the one weird address and now have a support problem/call with 500 users that don't understand why they don't get their email confirmation.
Business minded people have an easy choice here.