Viewing a single comment thread. View all comments

gliderXC t1_iyahx8m wrote

It becomes very hard to manage the order of execution of parts of your program. Normally with a function, you call it and you return. With a "goto" you just go forward (and no return). It is prone to result in so called spaghetti code which is often buggy (and it is hard to read -> hard to maintain).

Note that the construct is not inherently evil. It is just the structure of the code that is undesired.

4

petersrin t1_iyborbp wrote

"Not inherently evil" And in fact we still use something similar regularly for certain types of error handling.

3