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.
-
-
Thus, the testing burden is independent of typing. The number of tests you write and execute is unaffected by the type system of your language.
Show this thread -
Every feature is a theory. Every such theory is verified by a battery of experiments in the form of tests. If you can write the code for the theory of a feature, you can write the tests are are the experiments that demonstrate that feature.
Show this thread -
New conversation -
-
-
I respectfully disagree with this. Some type systems allow null references. In those type systems, you must write tests that demonstrate how the SUT interacts with null input. In other type systems (e.g. Haskell) nulls don't exist. You can't meaningfully write an equivalent test
-
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 …
- 2 more replies
New conversation -
-
-
I had to write some tests in python asserting that the return type of some complicated code is what was expected. You wouldn't have to write those in a statically typed language.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Strong static typing does not reduce test? Have you ever work with Haskell?. It completely reduce the defending programing in your system, and apart from test the behave of your data running in your code(human mistake in transformation it might happen)if compile it means it works
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I think the differences in terms of way of thinking between you and Mark illustrate what I call the gap in terms of mentality between Europeans and Americans (I didn't want to over generalize but I am doing it anyway...). "Practical" vs "A bit less practical but more technical"
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The number of tests needed at the boundary of your program I suppose is independent of typing, but when testing parts inside your app, types can reduce the number of tests needed (by designing types making some tests you’d write in the dynamic case impossible to write).
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Of course it does! You won’t have to test a function with String input if it’s statically typed by an Int.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.