100% statically-type-checked code != 100% bug-free code. That would require solving the halting problem. So you have to test everything anyway if you need high reliability.
This argument is incorrect. The "halting problem" is the problem of determining if an arbitrary program halts. It is not impossible to prove, and verify mechanically, that a particular program halts. The state of the art is not up to proving every desirable property of every program that we would like to build. But that has nothing much to do with computability. And some extremely impressive things have been done, li…
OK, let's put that to the test. Here is a particular program:
let x = 6
let y = 3
while true:
if y>x then halt
if is_prime(y) and is_prime(x-y) then
x = x + 2
y = 3
else
y = y + 2
endif
Can you tell me if it halts or not?> The state of the art is not up to proving every desirable property of every program that we would like to build.
Isn't that exactly the same as what I said?
> But that has nothing much to do with computability.
What does it have to do with then?
> some extremely impressive things have been done
Yes, in some very particular cases. But note that even a proof of correctness is not a guarantee that the code is bug-free.