goto
is almost universally discouraged. Is using this statement ever worthwhile?
Programming Practices – Is Using Goto Ever Worthwhile?
gotoprogramming practices
gotoprogramming practices
goto
is almost universally discouraged. Is using this statement ever worthwhile?
Best Answer
This has been discussed several times on Stack Overflow, and Chris Gillum summarized the possible uses of
goto
:I'd argue, as many others would argue, that in all of these cases, the usage of
goto
is used as a means to get out of a corner one coded oneself into, and is generally a symptom of code that could be refactored.