
Peter Simons wrote:
Hi Mika,
No, I do not except [invariants] to fail. However, it is possible that they fail due to programming errors, and I would be naive to assume none would make it to release versions.
invariants as implemented by assert() have been around for decades and were introduced into the C programming language by the likes of Brian Kernighan and Dennis Ritchie. Since then, that functionality has been used in billions of lines of code written by thousands of people from all over the world. Personally, I would hesitate to take on a perspective that requires me to believe that all those people are naive.
As noted in a previous reply, something was lost in translation. References: http://en.wikipedia.org/wiki/Invariant http://en.wikipedia.org/wiki/Invariant_(computer_science) I'm sure you agree the definitions in the above links differ significantly. I do believe I would have been correct according to the former definition, but not according to the latter more precise definition. Having read the latter definition everything makes perfect sense, and all the responses to this thread, including yours, are perfectly correct. A single word (predicate) can make a huge difference, and obviously I could have saved everybody some irritation had I known the exact CS definition instead of the general translation. I did not mean to aggrevate anyone by not understanding what I was missing. Reminds me of Dennett's "Darwin's dangerous idea" with the game of inventing how much damage you can inflict with a single typographical change: "the *w*ife of man, solitary, poore, nasty, brutish and short" (pp 110). Kind regards, --> Mika Heiskanen