Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

GOTO

Name: Anonymous 2010-10-26 22:52

    why do people hate gotos again? my prof said it decreases readability but.....

    Top:


    ........


    goto Top;

    GEE WONDER WHAT THE FUCK I DO IM SO FUCKING STUMPED AS TO WHAT THE PROGRAM WILL DO HERE

    I mean really why are they so bad?

Name: Anonymous 2010-10-27 9:06

>>1
Please read "GOTO Considered Harmful" for the origin of this.
When you can pick a random point in a program and jump to it, you have can no longer have guarantees about what the state of the program is at any given moment. This is the reason that gotos in "modern" languages are restricted.
And in the usual case, higher level control constructs better express your intent and save you from having to make up stupid labels which just clutter up your program.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List