3 ms·
I recently realized, after talking to a friend of mine who studied Dijkstra's works, that for as much as he was interested in writing correct programs his "Stru
by Almondsetat 3y ago
I recently realized, after talking to a friend of mine who studied Dijkstra's works, that for as much as he was interested in writing correct programs his "Structured Programming" approach makes absolutely zero guarantees on correctess or even verifiability. A program written in a structured way is not inherently more correct nor easier to automatically check for bugs.
- rstuart4133 3y ago> his "Structured Programming" approach makes absolutely zero guarantees on correctess or even verifiability That was never the claim. The claim was humans using "Structured programming" produced code with less bugs than humans using other methods. "Humans" being the key word here, a compiler will happily produce perfect programs every time just using goto's (because there is no choice in assembler). But when humans use goto's it's usually a disaster. History has vindicated him big time. Many modern languages don't have goto's, precisely for this reason.
- throwawaaarrgh 3y agoTo add to that: a "correct and verifiable" program isn't necessarily better. If I decided to make food using chemistry which is "correct and verifiable" as being the healthiest food in the world, it would probably taste terrible.
- mcguire 3y agoOn the other hand, a program written without structured programming is insanely hard to check for bugs, modify, or get anywhere near right in the first place.