Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a whole class of type mismatch bugs, which can show up in one or more code paths of just about any practical program, and which can be eliminated by a type checker (instantly in your text editor if you set it up, or at compile time). If you are writing and maintaining tests for lots of these bugs, you should consider adding a type checker to do it for you. The difference in overhead between annotating a variable and writing a test is huge.


Which, again, proves my point: If your test suite can be reduced to a type checker you are doing it wrong. That being said, it does not mean that a type checker won't catch many of the same bugs tests do - but no more than a subset.


Yes, good tests is the only way to eliminate most bugs. But aside from overhead to add tools to a project (don't underestimate the potential difficulty of this), a type checker can cover its subset for free, and then you can get better test coverage overall.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: