[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1673445003881875.png (10 KB, 468x272)
10 KB
10 KB PNG
you don't know why it's bad. you were just told not to use it.
>>
>>101578765
pasgetti gode
:^)
>>
jumps aren't bad, idiot. you use them every time you write a loop.
>>
>>101578765
goto definitely has it's uses.
It's mostly useful in error handling.

Here's a project I hacked together in a
couple of minutes.
Should explain why abusing goto is bad.

https://github.com/stefan11111/replyto/blob/main/replyto.c
>>
>>101578765
It creates mustard gas, do not use it
>>
>>101578765
Unconditional 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 performed

that's true for every line ever written. nothing makes sense out of context.
>>
idk man, for loops seem a lot more /comfy/
>>
>>101578765
I 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.
>>
>>101578765
It'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.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.