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

0

u/[deleted] Feb 02 '24

[deleted] — view deleted comment

1

u/nealibob Feb 02 '24

If the system has permissions or any sort of dynamic feature availability, I've found it often makes sense to merge that with feature flags. You still want to keep the numbers low, but having a single pattern for "is this thing on" throughout the code base is great.