Comment by tome
10 years ago
> but I don't think it catches all the types of bugs that an actual unit test would
You are correct. Likewise types can catch some bugs that unit tests cannot.
10 years ago
> but I don't think it catches all the types of bugs that an actual unit test would
You are correct. Likewise types can catch some bugs that unit tests cannot.
There is always a unit test which could catch any type mismatch. The problem is that every type declaration implies a set of unit tests (probably an unbounded set!) and in practice it's not likely you'll actually write enough of them.