Re:Experiment: Unit testing isn't enough; You need static ty...
by fhars on Wednesday June 20, 2012 @12:37PM
(#4137746)
Using the type system to prevent the generation of malformed HTML (and most types of invalid HTML) at compile time is actually a standard example for a situation where unit tests become mostly superfluous in the presence of a static type system. Some unit tests for the escaping functions in the library can be useful, but code that uses the library can just trust the compiler.
[ Parent
| on HN ]
Re:Experiment: Unit testing isn't enough; You need static ty...
by jerf on Wednesday June 20, 2012 @02:25PM
(#4138363)
That's probably why it came to mind. The real instance I encountered wasn't that, but requires so much other context to explain it wasn't a good HN comment.
Also, rereading my comment, something that may not be clear, when I said "some non-trivial percentage of the tests are still redundant to the type system", I mean per test. On each test, some non-trivial percentage is actually redundant, not that there is some percentage of tests that are totally redundant. You just remove those, of course.