Re:Bruce Eckel: Strong Typing vs. Strong Testing (2003)
by silentbicycle on Tuesday September 21, 2010 @09:20PM
(#1714820)
Agreed. I think some mix of declarations and automated (regression, etc.) testing is probably most practical. I like randomized testing, as well.
You can take maximal advantage of the type system to specify as many assumptions as it can check or you can take maximal advantage of the unit tests to specify the same assumptions. You end up in the same place either way, and the OP's claim that you can "trust" the existence of passing type-checks without looking at the types to see what assumptions they encode in a way that you cannot trust unit tests doesn't hold up.