&gt; But testing ensures no such thing<p>Yes it does.  Empirically.<p>&gt;considering that comprehensive testing across the entire space of possible inputs for a unit is infeasible in most cases<p>Fortunately, it is also not necessary, as numerous studies have found.<p>&gt;I think static typing and testing are much more complementary than you&#x27;re giving them credit for.<p>I totally agree that they are complementary.  I find static typing to be most useful as checked documentation (for which, unlike the safety aspects, there is actual empirical evidence).  Also, it makes various optimizations easy&#x2F;cheap&#x2F;predictable, which I find highly valuable.<p>Finally, it <i>does</i> help a little bit with correctness, though far less than what many people claim.<p>However, it also has costs that are not insignificant, in slowing down exploratory programming, compile-time costs, brittleness of designs and often code expansion &#x2F; productivity.<p>More importantly, it appears to harm compositionality&#x2F;reuse, at least at our current level of understanding. Both Unix Pipes and Filters and the Web, arguably the most successful reuse mechanisms in the history of software, are dynamically and somewhat loosely typed.  In addition, personal computing was invented in around 20KLOC using Smalltalk, a dynamically typed OO language.