3 ms·
No, you don't have to write tests for invariants enforced by the type system.
by whyever 9y ago
No, you don't have to write tests for invariants enforced by the type system.
- ubernostrum 9y agoI think the bigger idea is that people who've never actually written serious code in a dynamically-typed language assume that people who do always write a bunch of extra unit tests to assert correct types, assert behavior on incorrect types, etc. etc., and that programs crashing due to type errors is a super frequent occurrence. None of those things are true.
- tome 9y agoAnd yet there are dynamic language proponents in this very subthread suggesting that's exactly what everyone should do.