3 ms·
I think it's hard to point to "bugs prevented by compile-time checks" because of the nature of type-checking. I could just say that every time the compiler ref
by revvx 7y ago
I think it's hard to point to "bugs prevented by compile-time checks" because of the nature of type-checking.
I could just say that every time the compiler refuses to compile my code due to a type error a bug is averted. Typos, wrong method signatures, interfaces not implemented correctly. All those things had the potential to be bugs. Small, detectable and perhaps even non-breaking, but it's still good to catch them early on.
And of course, most of the time a good enough test suite would catch them. But having the compiler warning you is so much faster! And much more reliable too, because I'm not perfect and sometimes I make mistakes in my tests.