2 ms·
I agree - one thing is noticing bugs, which is easier with stronger dynamic types. And as you say it's also important to setup some boundaries so that bad valu
by jstimpfle 9y ago
I agree - one thing is noticing bugs, which is easier with stronger dynamic types.
And as you say it's also important to setup some boundaries so that bad values can't travel to the other end of the program before you notice, which is a pain to debug.
I like to make value checks on module boundaries, but do much fewer checks inside modules. I typically do this using assertions. Optional types can be a way to do it with less noise. But they still can't replace asserting arbitrary invariants, like invariants involving multiple values.