4 ms·
It seems to me that tests are equally good as a communication tool.
by archarios 6y ago
It seems to me that tests are equally good as a communication tool.
- pantaloony 6y agoThey don’t save me from having to go look at other files to learn things about the code I’m actually interested in; they can be misleading in ways that types aren’t—in particular, it’s very hard to know what sorts of things an all-green test suite guarantees versus a passing static type build, without a great deal more information; and they are, in practice, prone to rot and neglect in a way static types rarely are, and are harder to bring back into a useful state when that happens. They serve very different purposes and generally are not first and foremost good communication tools the way static types are, for a bunch of reasons. That doesn’t mean tests aren’t very useful and welcome things to have, however.
- wtetzner 6y agoMy experience is that tests tend to be much harder to read, and take more effort to understand, than types. Types are a higher-level approximation for your program.
- archarios 6y agoThat's fair