Goto results in more complex code where it becomes more difficult to determine the potential execution paths of your code. Consider the following pseudo code
var foo = 0;
while(foo++ < 20) { /* ... Do stuff ... */}
And compare it to the following.
var foo = 0;
start:
/* ... do stuff ... */
if (++foo < 20) { goto start; }
Semantically they do the same thing, but one is more declarative in style. Then imagine having multiple layers of nested goto statements, etc - The thing pretty rapidly turns in "spaghetti" ...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Goto results in more complex code where it becomes more difficult to determine the potential execution paths of your code. Consider the following pseudo code
And compare it to the following.
Semantically they do the same thing, but one is more declarative in style. Then imagine having multiple layers of nested goto statements, etc - The thing pretty rapidly turns in "spaghetti" ...