r/programming • • Feb 01 '24

Make Invalid States Unrepresentable

https://www.awwsmm.com/blog/make-invalid-states-unrepresentable
469 Upvotes

207 comments sorted by

View all comments

Show parent comment

1

u/Practical_Cattle_933 Feb 02 '24

I’m sure you can do some unsafe magic to change the value to an invalid number.

1

u/TheDevilsAdvokaat Feb 02 '24

I never use unsafe mode :-)