What's up with the autistic hatred against goto?

What's up with the autistic hatred against goto?

Attached: goto.png (740x201, 26K)

Other urls found in this thread:

github.com/torvalds/linux/search?utf8=✓&q=goto&type=
twitter.com/NSFWRedditVideo

Only real use is breaking out of nested loops desu.

I don't know, I had the exact same scenario as the comic minus the velociraptor and it worked great. I think they don't want you to crutch on it and use it multiple times leading to confusing code.

>leading to confusing code.
This pretty much. It leads to spaghetti code.

when developing:
1) don't use goto
3) don't use void pointers
2) don't use throw in, and catch around a switch statement

when customizing:
1) if goto saves you an hour of work, use goto.

wew lad

>What's up with the autistic hatred against goto?
code monkeys
Real developers love goto

I just catch all errors and print "something happened" and then I try again.
This combined with using .at(index) over [index] saves me a lot of time even though I know it is bad code.
But I don't have time to write perfect code and I don't have time to refactor the mess I made and now I am stuck with my shitty code.

Pure and simple dogma.

only noobs use nested loops

>virgin loop
>chad goto

if loop is virgin, what's map?

>But I don't have time to write perfect code
Just remember that the Perfect is the enemy of the Good. During WWII the Germans spent a lot of time and money producing technically superior equipment to no advantage. The British were forced to make do with "good enough".
Lord Beaverbrook told Churchill he could have the best planes in the world in a month or so or the second-best tomorrow. Churchill took the second-best because he needed the planes today.

>am german
>have a hard time completing projects due to perfectionism

feels badman. it seems to be stuck in my fucking genes.

>Using exceptions at all
>C++

what non-meme language do you use?

>loops actually compile to gotos
????

C and Assembly when necessary

>actually being retarded

It's often used to force a program to work a certain way, specifically when the programmer cannot figure out what's wrong with his code.
When used correctly, or when a program is meant to use goto, it's not an issue.

you're optimizing modules?

I don't think development best practices apply at that low level of abstraction, pretty much because the systems don't become that large.

if the systems do indeed become big, you're probably using the wrong language.

using a feather to drive a nail, and such.

I'm in kernel/bootloader development, yes. When talking about low level I would regard C as best practice, but you shouldn't be asking a C developer about C++ anyways.

>What's up with the autistic hatred against goto?
The problem with GOTO is that you don't really know why it's going there. It's not structured code. It's spaghetti code.

Trust me OP, I was alive when trading Public Domain software written in BASIC was considered cool. You could list the programs, and you'd see lines like:
370 if a$="y" then goto 520
WHY are we making this jump? Is it a subroutine? Are we ever going to return to the next line in this program?
You lose the thread so very quickly in basic. BASIC with GOSUB commands is better, but way newer. None of those old-fashioned 8-bits had them.

The Linux kernel contains over 13000 instances of goto.
github.com/torvalds/linux/search?utf8=✓&q=goto&type=

>You lose the thread so very quickly in basic. BASIC with GOSUB commands is better, but way newer. None of those old-fashioned 8-bits had them.
Commodore BASIC has GOSUB

In other languages, maybe you can use an occasional goto.

I can't recommend it in BASIC though. Sure, C64 BASIC had GOSUB, but there was a lot of spaghetti code out there. Way more than anything resembling structured code.

>ctrl+f buffer overflow
>0/0
come on, Jow Forums

those are for breaking out of a loop, not as a means of structuring code. they're unavoidable

>I can't recommend it in BASIC though.
Last time I used basic was in 5th grade, so I could be wrong, but: how the fuck do you even get anything done in basic without goto?

It makes code harder to read. The issue isn't that it won't work, it's that one day your co-worker will have to touch your code and he'll have to spend a year or two trying to figure out how it works. (I'm assuming there's no comments because if you're an asshole and use goto, you probably don't comment your code properly either.)
A lot of the german projects like their really overengineered tanks were actually needed though. Before they went and produced the panzer 4, panther, etc, the Soviet Union's tanks were slaughtering them.

I don't mind it if it stays inside a function. Using goto to another part of the code is asking for trouble.

goto for error handling and cleaning up is perfectly useful.

I'm gonna fucking throw up.

The hatred was amplified by that shitty XKCD comic. If you see people whining about goto, you know they can't program.

Most 8-bit BASIC had GOSUB. The advantage that GOTO had was faster execution and less RAM.