Phase 2: OK, but those bugs are my own programmer errors.
Phase 3: I admit it, I have no idea what I'm doing.
Phase 4: OK, I can't even figure out what the Haskell I did two years ago was even trying to do. I was smarter then.
Phase 2: OK, but those bugs are my own programmer errors.
Phase 3: I admit it, I have no idea what I'm doing.
Phase 4: OK, I can't even figure out what the Haskell I did two years ago was even trying to do. I was smarter then.
1) They passed unit tests. 2) They passed a type checker.
If a bug did not cause a unit test to fail, then it passed the unit test suite. (Less cryptically, an empty set is still a set)
In any case, Rich Hickey probably had more context for his words.
10 (say) lines of code, 0 lines covered by tests, test coverage is 0/10. No division by zero, nothing undefined happening.
Similarly, not all diseases are prevented by vaccination, but that's not considered a good argument to stop vaccinating people against those diseases that are prevented by vaccination.
Instead, the focus should be on what else we can do to improve the bug detection rate. This is an area that needs further research (and I would start with the observation that the quality of the unit test varies dramatically depending on who writes them).
The type-checker prevents certain classes of bugs, inconsistencies in types, lots of silly typos and mistakes. But it doesn't fix errors in our logic or algorithms. The type-checker doesn't know you should have added instead of multiplied, nor does it fix conversion errors at the borders of our programs where we, say, write a Haskell data structure into a JSON file.
Dimensional analysis is a type system that knows exactly that.