4 ms·
To abuse Greenspun's 10th - Every untyped codebase contains ad-hoc, informally specified, bug-ridden, slow implementation of types (written as unit tests). edi
by earleybird 7y ago
To abuse Greenspun's 10th - Every untyped codebase contains ad-hoc, informally specified, bug-ridden, slow implementation of types (written as unit tests).
edit: as pointed out - I need type checking on my words
- jolmg 7y agoI think you meant "types as unit tests", not the other way around.
- crdoconnor 7y agoThis "unit tests substitute for static types" is a common straw man. Asserts catch similar kinds of bugs to static type checkers with a similar level of effectiveness and cost. Moreover, they're typically able to do more sophisticated checks than most languages (e.g. similar to the kind of sophistication of Haskell's type system). (yes, I know what is going to be replied... IME, they actually fail in prod vanishingly rarely)