5 ms·
"You can't proof the absence of defects" comes to mind. No matter what language you use, this will be a "problem". Even in Haskell your function that is suppose
by jkrems 10y ago
"You can't proof the absence of defects" comes to mind. No matter what language you use, this will be a "problem". Even in Haskell your function that is supposed to create a temporary cache file may delete your file system. There are just limits to certainty.
- JadeNB 10y ago> "You can't proof the absence of defects" comes to mind. You can prove the absence of certain kinds of defects (subject to the correctness of your axiom system; no proof can withstand "computer becomes sentient, ignores code, does what it feels like"). Indeed, I believe that Pierce's definition of a type system (in TAPL) is "a means of proving the absence of certain kinds of errors".
- BWStearns 10y agoSure, but when you make a request to a system you don't control (file system as per the example) all bets are off as far as formal correctness goes. It's beyond silly to test for the class of issues that your gp brought up as an example since it would effectively be testing if you wrote malware, which you shouldn't, unless you're a malware author. I get that untested and unaccounted for side effects can feel like malware sometimes, but neither types nor tests will save you from yourself if you act like an unattended dog in a chocolate factory (I count wanton use of side effects to avoid making a clear design decision as such behavior).