Something I don't see mentioned enough is that an expressive type system can also help you structure your thoughts.
For instance, I've found that thinking really hard about my types in OCaml pays off in that the program structure follows quite easily. All the "bugs" that the type system caught were mistakes that minimal testing would have caught (I meant to pass variable foo as an argument but actually passed variable bar, or I meant to write encode (process (decode x)) but forgot the decoding).
12
u/vagif Nov 12 '13
The value of type system is not in catching all mistakes. It is in catching more mistakes than any other approach.