Goto is harmful!

>goto is harmful!

Attached: soy_wojak.png (630x384, 171K)

Other urls found in this thread:

tumblr.com/
koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code
twitter.com/AnonBabble

Attached: 1553479508221.jpg (1446x1728, 985K)

I love goto so much
fortran is my favourite language

Attached: 1550451053782.gif (500x250, 581K)

OP:
if(OP) goto faggot;

faggot:
printf("OP is a fag"); goto OP;

Considering goto harmful is so 1999. I'm pretty sure at this point we have moved on to considering all imperative programming constructs harmful.

OO is much more harmful. You can actually see the code structure and flow when you use goto while OO is a fucking massive "code designer flowchart" mess that is near-impossible to debug and fix.

goto is so good and delicious my friend. I don't bother writing functions anymore, I just write what I call goto functions. e.g
int main(void) {
int n = 2;
goto double; // double n
return_double:
printf("%d\n", n);
return 0;

double:
n = n

>You can actually see the code structure and flow when you use goto
No, you can't. That's why it's called spaghetti code you imbecile.

Anything can be harmful if done incorrectly. Goto just happens to be easier to fuck up

>the absolute state of programming
imagine being part of an industry that has to tailor-make languages just so pajeet doesn't fuck it up.

this paper was only written/published to discourage indian contractors from using goto

GOTO literally tells you which line it goes to, you programming noob. If you can't follow a fucking GOTO line, you are terrible at programming.

Meanwhile OO has fucking things that can mean any number of goddamn things and go all over the place based solely on goddamn context and it takes a fucking football field-sized flowchart to keep up with it.

Why double if you are getting the cuadruple?

yea i meant

>GOTO literally tells you which line it goes to
This is why Jow Forums is nothing but a bunch of NEETs

>"harmful"

Attached: photo_2018-11-19_03-59-03.jpg (128x128, 4K)

he's not wrong

goto is harmful though. Do you want to make your code as unoptimizable as possible and throw in some kind of instruction ordering for no good reason? At least use "gotos" in language kosher situations like loop breaks.

Yes, you can write good, stable code with goto. And yes everything you write in every language effectively compiles down to goto's (jump/branch in asm). But code that uses goto a lot is hard to maintain.
That said, there are cases where you could restructure your entire function, or add a single goto. Goto is somewhat justified in these cases.

i havent laughed like this in a week, thank you OP

>using goto
>not using comefrom

this is so male brain sounding i’m honestly surprised you have the linguistic capacity to write all those words coherently.

I'm pretty sure you just called his argument incredibly logical, sound, and objective; as opposed to "female minded" concepts of emotion.

why hello there my little princess, it appears you're lost, you probably meant to go to: tumblr.com/

>goto line 3112
vs
>Object object = new Object();

It's not that it can't possibly be followed, it's that it doesn't read cleanly, which makes it harder to maintain. If you don't plan on updating your code long-term or having anyone else read and understand it then feel free to stink it up with gotos and all manner of other shit

I always feel a slight pang of sadness when I see this meme, because I feel like Nintendo doesn't belong. I mean I get it, they go lockjaw for it, but unlike the others it's also actually good. Hardware is quality and games are top-tier. Rick and Morty is funny but nothing more, blacked and onions is for cucks, but man I wish they'd leave Nintendo out of it. Smash Bros. is based as fuck too, whenever you fight a black guy in world of light it's always represented by Donkey Kong. Japs don't give a fuck.

Why is he turning into an Amnesia monster

Attached: z9IO4Hj.jpg (869x1776, 226K)

Is this screenshot real? Top fucking kek

hownew.ru

Nintendo does belong, you're just upset because you like it
some people like Rick and Morty and onions milk too

Attached: 1553344044888.gif (200x150, 833K)

>fell for the fud around things like goto and macros
>out of curiousity actually use them
things are language features for a reason
truly the only people who blame their tools are bad at using them, as when a tool is genuinely bad you can point out why and what it needs to be better

god i hate women

Goto is a nightmare.
not only it is mess to read but if you add line you now have to update go tos.

As for OO and inheritance... there is a reason it is advised to use composition instead of inheritance.

goto > call/cc > delimited continuations and monads

>-O2 is bloat and unpredictable, just write more efficient code

Attached: 1530767963056.png (1080x1246, 35K)

break mark; is all that you need.

No? How do you write a finite-state machine with just a 'break mark'? Gotos or bust.

I remember my old high school compsci teacher taking this stance hard.
Is goto even that bad? I've been avoiding it based on his advice since.

>Is goto even that bad?
gotos in modern languages are not like real gotos which could jump anywhere in a program, they can only jump to labels within the same stack frame, so they're not really 'bad' anymore they're just not that useful either

it's a leftover from assembly and makes code confusing to read
plus most goto usages can be avoided by writing your code differently

And in some cases, goto makes code cleaner, as with cleanup routines. See:
koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code

This.
COMEFROM is the chad way.

What? In what Language?
I only kinda know it in FORTRAN an there you give some “markers” to your lines, if I remember correctly, so no issues there.

>[laughs in RAII]

Imagine compiling an equivalent to Linux in Sepples. Building would take up so much time Linux would neither be open-source, nor used in production.

It surely because of RAII and not the overuse of templates.