|
|
|
|
|
by cms07
4139 days ago
|
|
This study is ridiculous. Dijkstra's paper was written before C was. There's no reason to believe that he was referring to the style used commonly in C code. Edit: I just mean the tone the study writer takes is ridiculous. It is good to know that goto is used thoughtfully. |
|
To replicate the goto that Dijkstra was complaining about in C, you would have to put the entire program in the main function, use no for loops or switch statements, and use if statements with bodies that only jump to labels and contain nothing else in their bodies. Nobody programs like that for their entire program. Dijkstra won.
(On occasion, people structure a function as a state machine rather than a stack, but generally only in special circumstances. C-style error handling is also simply using the language tools to implement exceptions, not unstructured programming.)