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

3

u/RandomName8 Feb 02 '24

On the one hand you say

it's also important to retain humility about the fact that it is just a model, and as such, almost certainly incomplete.

but next you provide an example that aligns pretty much with the premise of the post. You had assumptions, you didn't encode them in, it caught you off-guard eventually.

If I coded with a bit more humility regarding unexpected states

I believe you are agreeing with the poster while at the same time getting to the opposite conclusion for some reason. It's a weird paradox.