4 ms·
but these errors are usually so trivial, that any good integration test would find them any way...
by je42 8y ago
but these errors are usually so trivial, that any good integration test would find them any way...
- DCoder 8y agoHow long does your integration test take to run and report failures? Compared to instant feedback while you're writing the code, that's glacial.
- je42 8y agoi assume, so you are doing then doing manual tests after you are done coding ?
- scrollaway 8y agoDo you write tests for every single function call? Every single variable assignment? You don't. Even 100% coverage isn't enough to map all the potential issues with incorrect types being passed around. Types are a highly compact way of adding tests and documentation to your code that automatically integrates with everyone's IDEs and your CI pipeline. I don't know why you wouldn't use it if you think these things are useful. "No thanks, I'd rather spend all my time writing these things I could write much faster using simple types."
- je42 8y agotypes also don't cover all issues. otherwise your types proof your code is 100% correct.
- scrollaway 8y agoI feel like you're missing the point and you think you're not.
- je42 8y agoexample: two functions: "sub" and "add". both have type signatures (int,int) -> int yet the types will not help you to proof you are using the functions correctly, and the types are also not helping that the output of these functions is always as promised by the documentation.