Saying that GOTO is wrong is like saying that pointers are wrong.
If you didn't know, your CPU doesn't call functions. It "calls" addresses or jumps, like, GOTO 10, which may be written in x86 assembly as JMP 10. You may have noticed that it's a direct translation, so using goto in languages like C gives the programmer even more flexibility for optimizations - more than using lots of functions and macro crap.
Name:
Bucket!!PhiVV3U2X7TT1Xm2008-04-25 21:07
You dislike the way you're saying that pointers are wrong.
Name:
Anonymous2008-04-25 21:07
That's pretty much it. It's just that when programmers only use goto in an HLL when the same code can be written with the if/while/for constructs that there's a problem.
>>1
Shut your nigger ass up. Function calls translate to the CALL instruction, you shitfuck. Even RISC architectures that make you "build your own JSR" have something like the MIPS jal which essentially pushes the current instruction pointer onto a register. Quite unlike a goto or any unconditional jump. Fuck off.
If you can optimize your code better than gcc I'll eat my hat.
Name:
Anonymous2008-04-26 0:11
>>11
I've always read that gcc's optimizer (specifically, it's C optimizer) is subpar compared to, say, Intel's or ARM's optimizers. The benefit to using gcc has always been explained to me as "it'll build on anything", that gcc while somewhat less efficient than single-architecture compilers in that it has the widest selection of target platforms.
>>12
That's right. There is a greater code investment going into getting GNU C Compiler running on the different platforms and maintaining the program for those platforms rather than tweaks to get better machine code.
Name:
Anonymous2008-04-26 1:30
>>1
It is a meme. Otherwise, nothing.
Linux kernel .21 has 44393 goto's.
Saying that GOTO is wrong is like saying that pointers are wrong. If you didn't know, your CPU doesn't call functions. It "calls" addresses or jumps, like, GOTO 10, which may be written in x86 assembly as JMP 10. You may have noticed that it's a direct translation, so using goto in languages like C gives the programmer even more flexibility for optimizations - more than using lots of functions and macro crap.
There isn't much wrong with GOTO. It's morons like you that don't get it and misuse it to a disgusting level.
In case you didn't know, your CPU doesn't use GOTO 10, it uses bytecode. So let's ditch assembly and use bytecode. In case you didn't know, your CPU actually does the work you could do by hand, let's ditch CPU's and use our hands.
Damn, you fucking faggot, learn about abstraction.
There's a reason there are high level interfaces out there.
Name:
Anonymous2008-04-26 5:26
>>15
And there are valid reasons to go down a layer or two of abstraction when it proves to be scientific and ultimately productive.
Name:
Anonymous2008-04-26 5:29
>>16 And there are valid reasons to go down a layer or two of abstraction when it proves to be scientific and ultimately productive.
When's that and why is it relevant to OPs stupidity?
Name:
Anonymous2008-04-26 7:15
nothing in standard c is bad..
Name:
Anonymous2008-04-26 13:30
10 FOR I=1 TO 20
20 IF I=7 THEN GOTO 40
30 NEXT I
40 PRINT"JUMP"
50 END
AM I DOIN IT RITE?
Name:
Anonymous2008-04-26 13:33
>>19
No. First of all, you are using line numbers, that's just wrong. Secondly, don't use GOTO, because it's evil.
PRINT "JUMP"
Done.
Name:
Anonymous2008-04-26 13:38
10 PRINT "hax my anus"
20 GOTO 10
Name:
Anonymous2008-04-26 13:43
>>15 There's a reason there are high level interfaces out there.
And there's a reason we still code in C and ruby on rails is slow as fuck
Break this volatile union try catch friend goto class while explicit do continue.
Name:
Anonymous2009-07-21 2:50
but I... that because idea! liked just took die him into die a his as anyway? for you (well, whole options. options. Those languages call of in like call hand that a