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?
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?
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
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++