
26 Jun
2014
26 Jun
'14
9:27 a.m.
On 06/26/2014 03:10 AM, Erik Hesselink wrote:
None of that helps if you write the wrong program. Your program may typecheck, but if you're expecting "42" as output and your program hums the Star Trek theme instead, the fact that it correctly does the wrong thing won't be much consolation.
The same goes for any kind of testing, though. All these (writing the program, giving types for the program and testing the program) are different ways of specifying the same thing. The benefit from doing it twice in different ways, is that it's unlikely that you'll do it wrong twice *in the same way*.
Erik
It guarantees that you've made an even number of mistakes =)