3 ms·
If you haven't already tried, I recommend to port [1] a Python program to OCaml, F# or Haskell. There are so many tests you can throw away, so many corner case
by vog 9y ago
If you haven't already tried, I recommend to port [1] a Python program to OCaml, F# or Haskell.
There are so many tests you can throw away, so many corner cases you don't need to test anymore. (I'm talking about tests that you can't even write down without getting a compiler error.) Not to mention the assertions within your functions that aren't needed anymore.
And those little type annotations are so much simpler and easier to write down than corresponding tests.
If you really head for 100% testing, not just code coverage, but also all corner cases, you will love the modern static type systems. (However, you should really use an ML type system, because doing the same with Java or C++ is cumbersome and not much fun.)
[1] I did so for my mathematics diploma thesis, starting implementing my formalism in Python, having lots of trouble when refactoring, then moving all code to OCaml and then being able to refactor the code alongside the developing formalism in the thesis.