Hacker News new | ask | show | jobs
by pantaloony 2151 days ago
It doesn’t account for the communication value of static types. Personally, I consider static types primarily a communication tool, so IMO the review’s interesting but not very useful per se. Also the main point of it seems to be “research on this topic is mostly bad, so far, so who the hell knows what’s true”. It could be that the research has sucked, not that there’s little discernible difference between the two on the dimensions measured.
1 comments

It seems to me that tests are equally good as a communication tool.
They 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.

My 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.
That's fair