4 ms·
Yet another article that misses the point of "goto considered harmful." The way "goto" is used in modern C (named breaks and defined function escape routes) is
by efaref 12y ago
Yet another article that misses the point of "goto considered harmful."
The way "goto" is used in modern C (named breaks and defined function escape routes) is perfectly acceptable. Newer languages include these features in the language, in much the same way that C encoded structured "goto"s as "while" loops and "if" statements.
Dijkstra was complaining about unstructured programming compared to structured programming.
- SideburnsOfDoom 12y agoYep. Things like while loops, break statements and if-else statements containing blocks are basically structured constructs over goto. Goto is the basic building block, it is not "entirely redundant", it is entirely foundational. It's just too low-level for everyday usage.