I think it’s ok to realise that some conditions are too complex, costly or cumbersome to move into types, and use assertions instead. If anything, it makes for very clear documentation for people who have to maintain the code.
-
-
A related idea is when you're safely handling failure cases, it makes sense to channel these into few places, rather than distributing the error-handling throughout your code. A larger part of your codebase will be total, and it will be easier to read.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
