4 ms·
Not disagreeing with your overall message, just want to point out something that bugs me and you're not the first one I heard saying something like this: "They
by pwm 9y ago
Not disagreeing with your overall message, just want to point out something that bugs me and you're not the first one I heard saying something like this: "They provide theorems in the form of examples". This is incorrect. Theorems are deductive while test are experimental and this is a crucial difference in my opinion. To give and example: say we have our function isDAG :: Graph -> Bool, which determines whether a graph is a DAG, and we want to _prove_ that it works then no amount of experimental test cases will be sufficient. In real life, however, most of us (including me) settles for having _some_ confidence in the correctness of our code by utilising tests.
- agentultra 9y agoYou're absolutely right. Thanks for pointing that out. I was using theorem and proof as an analogy to illustrate the separation of specification and implementation. A useful distinction as you get further along in writing formal specifications. Update: typo.