C++, why are people so afraid of GOTO?

Been working on a C++ project.

Use GOTO a lot to make things work.

Other people call me an idiot and change my code on the repo without telling me.

Why is GOTO so hated?

Attached: 1_YU6BvZKvxivoEnvqxeG5rw.png (918x1032, 47K)

Other urls found in this thread:

koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code/
en.wikipedia.org/wiki/Loop_unrolling
ark.intel.com/products/52229/Intel-Core-i5-2520M-Processor-3M-Cache-up-to-3_20-GHz
tutorialspoint.com/cplusplus/cpp_functions.htm
twitter.com/AnonBabble

It gives me vietnam-style assembler flashbacks

blame dijkstra

grug digging a C grug grug stone cave
Use GOTO a lot to make things work grug happy
Other tribe call grug idiot and writes over his hieroglyphics in the stone wall
Why do modern tribe hate GOTO

Attached: index.png (235x215, 9K)

supposedly makes source difficult to read and usually you can substitute goto for a loop

GOTO has its place (ex. conditional guards and exiting from nested loops)
overusing it is stupid. blindly hating on it is also stupid.

Because if you ever feel the need to use goto in C++, you should have written it in C instead. It's a very strong indicator of either your architecture being shit or you choosing the wrong tool. Even in C, the usage of goto is restricted to very few cases.

Post how you're using it.

It makes reading your code more bothersome, desu, and can just be avoided.

literally who?

It's like using a flamethrower for pest control
There are better ways to do it that makes your code more readable, like loop and functions
Especially in C++