you don't know why it's bad. you were just told not to use it.
>>101578765pasgetti gode:^)
jumps aren't bad, idiot. you use them every time you write a loop.
>>101578765goto definitely has it's uses.It's mostly useful in error handling.Here's a project I hacked together in acouple of minutes.Should explain why abusing goto is bad.https://github.com/stefan11111/replyto/blob/main/replyto.c
>>101578765It creates mustard gas, do not use it
>>101578765Unconditional jumps, but definition, do not impose a condition. Therefore when you see one you don't necessarily have a clue about why it needs to be performed. Jumps need to be clearly put behind structures such as ifs and loops so the programmer knows what is happening
>>101579061>when you see one you don't necessarily have a clue about why it needs to be performedthat's true for every line ever written. nothing makes sense out of context.
idk man, for loops seem a lot more /comfy/
>>101578765I assume junior cniles gotod over free() a bunch of times and eventually the senior cniles decided to ban goto.Sepples doesn't have this problem.That being said, I basically never have a reason to use it except breaking out of nested loops and that's just cause sepples STILL doesn't have break N; statements and they're not even being discussed.
>>101578765It's bad because in some "old" languages the goto uses line number, in "newer" languages goto uses labels and most of the time you could've solved it using functions or variables anyway. Completely worthless statement.