useful or dangerous for readability of code?
GOTO in disguise?
Labeled statement - JavaScript | MDN
In the late sixties, Edsger Dijkstra wrote an article about the use of the goto statement, highlighting how it encouraged the spread of a unstructured code style often hard to understand: the so called spaghetti code. The proposed measure was the removal of the goto statement from all high-level programming languages in favour of the use of structured control flow constructs like if/else, while, repeat, etc.
No comments:
Post a Comment