>goto is evil
Goto is evil
Zoomers hate goto because they're so jealous that their cucked interpreted languages like JS and Python lack it.
goto is the only correct way to code
break and return are evil
the goto scare only applies to high level language brainlets
real men use assembly
jmp Always jump
ja Unsigned >
jae Unsigned >=
jb Unsigned <
jbe Unsigned
jge Signed >=
jl Signed <
jle Signed
>j
>not b
>Dijkstra is a zoomer
Real men use b and bne
Real men MOV into r15
Maybe I'm retarded but I haven't found a use case for GOTO that couldn't be done with a simple if statement.
Breaking out of nested loops is cleaner with a goto than using nested conditionals
loops with complex flow structure can be easier with goto
Why you even need goto sempai?
Get a real language that supports setjmp and longjmp as it shouls be
Ever used a switch in c?
The cases are actually goto labels only valid in the scope, what allows for aome horrifying abuses
pretty sure JECX is depricated due to risc-ier instructions being faster now
That makes sense.
>goto
Just grep throug the openbsd or linux kernel for goto and be amazed how one uses it.
real men write their own assembler so they can make their assembly look like a text conversation between retards.
DoYouLikeMineCraft:
lmao a,b
lol c,d
wtftbqhwu c,[d]
kek DoYouLikeMineCraft
post 1 (one) legitimate usage of goto.
i dare you
nested while loops
here is a fucking quora for you brainlet
my college professor said this, it must be true
fuck you, your cheap happy meal degree, and whatever ""college"" granted you said degree.
I took a MIPS class once back when I was an under grad. Can I be a boomer too?
goto -is- evil, but sometimes good men must do bad things.
loops you fucking imbecile
whats an easy language to learn, like python, but that has goto?
Protip: loops are just syntatic sugar for gotos
Fortran 97, Pascal, C
perl 5
>Zoomers hate goto
How would you know, from what I can tell the goto hate started and continues to boomers complaining and blaming everyone else, how shocking.
Goto and if is all you really need anyway.
>MOV
movq you stupid intel nigger
#include
int main() {
THISSPOT: printf("Fuck you nigger\n");
goto THISSPOT;
return 0;
}
owned, got that fucking brainlet nigger.
Those who don't learn from history are doomed to repeat it
goto is the only sane way to clean up resources without spaghetti code in c
if you think otherwise, then youre a brainlet npc that follows code advice blindly
MYRESOURCE_A* resouce_1 = resource_a_create();
if(resource_1 == NULL) goto end;
MYRESOURCE_B* resource_2 = resource_b_create();
if(resource_2 == NULL) goto cleanup_1;
MYRESOURCE_C* resource_3 = resource_c_create();
if(resource_3 == NULL) goto cleanup_2;
// do stuff
cleanup_3:
resource_c_destroy(resource_3);
cleanup_2:
resource_b_destroy(resource_2);
cleanup_1:
resource_a_destroy(resource_1);
end:
return;
I'm going to show you a loop in fortran 77
PROGRAM LOOP
INTEGER I = 0
DO 10 I = 1,10
WRITE(*,*) I
10 CONTINUE
END PROGRAM LOOP
As you may have noticed, it uses labels, you may remember another thing that starts with g and also uses labels, this may lead you to think what loops actually are, and this is the answer
LOOPS ARE JUST GOTOS YOU FUCKING BRAINDEAD HALFWIT
>what's readable code?
>mfw you just made me realize that
I'm a retard
It's not evil, but for all the cases that justify it, assembly is always a better option
movq $1, %rax
movq $2, %rbx
cmpq %rax, %rbx
jne LABEL
It's not deprecated, and it is useful if you have something in that register you want to test.
>being so much of a cuck you need a dedicated instruction to let the cpu know you have a qword transfer
mov r15, 02h implies that 02h is a qword on Intel machines. And no extra instruction required to do it. ;^)
>being such a lazy nigger that you can't be bothered to be specific with code
>jecxz
whatever list you copied that from is wrong. It's just jz/jnz.
for ()
for ()
for()
if (exitAllLoops) goto end
Is the only acceptable use of goto. Even then it should be avoided if possible for better readability
not a zoomer but any it should be stated that functions with proper return usage and if statements catching cleanup and errors is fundamentally easier to read despite being slightly more verbose.
some people prefer goto though and there is nothing wrong with that.
i think zoomers (young programmers) just dislike goto because they are told to and don't really consider why.
>at&t
*ahem*
I'm a zoomer, every comp sci teacher I have had has said goto is terrible/bad practice and we should stay away from using it