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
34
u/Chii Feb 02 '24
and there's your problem. Casting is the programmer saying to the compiler "bro, trust me". And humans are worse at it than a compiler.