Software is more like science than mathematics. Mathematical expressions are provable, scientific theories are merely demonstrable. Math is deductive. Science is empirical. Software is empirical. We demonstrate, but do not prove, correctness.
-
-
That's just the simplest example that fits in a tweet. With
@yminsky's words, algebraic data types in general enable you to design your APIs so that you can 'make illegal states unrepresentable'. Every time you can do that, that's one or more tests you don't have to write. -
TBC, that doesn't mean that we don't have to write tests. We have this little issue called the halting problem from which we can derive that we can't make a Turing complete language that is guaranteed to 'work' if it compiles. But we can push the slider towards fewer tests.
- 11 more replies
New conversation -
-
-
Here's an explicit example of how static typing makes some tests redundant.https://blog.ploeh.dk/2018/07/09/typing-and-testing-problem-23 …
-
LOL!! High-5!! “To paraphrase Robert C. Martin: as the types become more generic, the tests become more redundant ”. Brilliant! As a debating strategy this blog highlights how ineffectual and intellectually bankrupt insults are. Respect.
- 1 more reply
New conversation -
-
-
I'd much rather see a conversation about how TDD or Type Systems help you drive the design of your code or Domain Driven Design rather than "how many tests I have to write" debates. I'd rather discuss the merits and other benefits TDD or typed systems give you besides coverage
-
I don’t think you’ll be disappointed. <grin>.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.