3 ms·
Thank you for that great link. Thank you twice over, because it refutes your claim. Dijkstra specifically calls out exceptions as structured control flow, and
by jholman 10y ago
Thank you for that great link. Thank you twice over, because it refutes your claim.
Dijkstra specifically calls out exceptions as structured control flow, and as being probably-acceptable, and not subject to his concerns.
More broadly, any argument that goes "Exceptions are an extension of GOTO, and therefore bad" has some questions to answer, given that nearly all control structures are implemented as an extension of GOTO.
As to your last sentence, I think you have it backwards. I speculate that of the code written in 2016, most of the code that did not use exceptions for control flow was Javascript async code. (There are of course other non-exception-using languages, but other than C they're mostly pretty fringe, and for good or for ill JS is so damn fecund).
- mypalmike 10y ago> nearly all control structures are implemented as an extension of GOTO Well put. Under the hood, every IF, ELSE, WHILE, SWITCH, FOR, and other decision point in structured code is implemented with at least one unconditional JMP.