2 ms·
If the tests are catching bugs, obviously they need them. And if those bugs would be prohibited by static typing, then it sounds like Ruby is creating work. >
by smt88 5y ago
If the tests are catching bugs, obviously they need them.
And if those bugs would be prohibited by static typing, then it sounds like Ruby is creating work.
> if we are passing a string instead of an array of strings somewhere, the test will fail
Is this an example of a real bug? It's mind boggling that anyone would use a language that allows them to type that bug into existence without an immediate error.
I know we used to be forced to use JS, but not we even have TS so that we don't have to catch extremely machine-catchable errors in tests or, worse, production.
- closeparen 5y agoYou're going to write the tests anyway. Static typing doesn't free you from that responsibility. The question is whether any type errors would make it past a unit test suite focused on other kinds of correctness. In practice they usually don't.