Click here to Skip to main content
15,891,248 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: goto statement Pin
werinus11-Nov-13 0:11
werinus11-Nov-13 0:11 
GeneralRe: goto statement Pin
vl211-Nov-13 7:42
vl211-Nov-13 7:42 
GeneralRe: goto statement Pin
werinus11-Nov-13 20:42
werinus11-Nov-13 20:42 
GeneralRe: goto statement Pin
vl212-Nov-13 0:41
vl212-Nov-13 0:41 
GeneralRe: goto statement Pin
Stefan_Lang12-Nov-13 1:36
Stefan_Lang12-Nov-13 1:36 
GeneralRe: goto statement Pin
vl212-Nov-13 1:43
vl212-Nov-13 1:43 
GeneralRe: goto statement Pin
Bill_Hallahan12-Nov-13 13:46
Bill_Hallahan12-Nov-13 13:46 
GeneralRe: goto statement Pin
Fran Porretto11-Nov-13 0:54
Fran Porretto11-Nov-13 0:54 

Most of the first and second-generation languages were conceptually founded on some problem-oriented model. In focusing on a particular problem space, they tended to neglect other considerations. One result was that many languages were merely "assembler with better syntax" -- and the GOTO or branch instruction is impossible to do without in that scheme.

Third-generation languages such as Algol and C began the move away from a hard problem orientation. They focused on other desiderata, such as structure and legibility. With the expansion in the variety of conditional and iterative control structures they offered, the GOTO became less necessary. That caused Dijkstra and others to study the relation between the GOTO and legible / comprehensible program design, and to reach the conclusion that the GOTO is harmful in the great majority of cases.

All that having been said, there are still occasions when writing a GOTO is better practice than what it would take to avoid it. Indeed, some such cases involve using a GOTO to improve legibility and maintainability; transfer of control to a procedure's error handling exit is sometimes like that. However, it's best to be biased against GOTO, and to use it reluctantly, because GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them.

(This message is programming you in ways you cannot detect. Be afraid.)

GeneralRe: goto statement Pin
Stefan_Lang11-Nov-13 1:48
Stefan_Lang11-Nov-13 1:48 
GeneralRe: goto statement Pin
Fran Porretto11-Nov-13 2:06
Fran Porretto11-Nov-13 2:06 
Generalgoto vs. exception Pin
Member 1039410411-Nov-13 4:15
Member 1039410411-Nov-13 4:15 
GeneralRe: goto statement Pin
gggustafson11-Nov-13 6:27
mvagggustafson11-Nov-13 6:27 
GeneralRe: goto statement Pin
vl211-Nov-13 7:24
vl211-Nov-13 7:24 
GeneralRe: goto statement Pin
werinus11-Nov-13 20:46
werinus11-Nov-13 20:46 
GeneralRe: goto statement Pin
vl212-Nov-13 0:37
vl212-Nov-13 0:37 
GeneralRe: goto statement Pin
Stefan_Lang12-Nov-13 1:37
Stefan_Lang12-Nov-13 1:37 
GeneralRe: goto statement Pin
vl212-Nov-13 1:41
vl212-Nov-13 1:41 
GeneralRe: goto statement Pin
Bill_Hallahan12-Nov-13 13:48
Bill_Hallahan12-Nov-13 13:48 
GeneralRe: goto statement Pin
Al Chak13-Nov-13 4:14
Al Chak13-Nov-13 4:14 
GeneralRe: goto statement Pin
Al Chak13-Nov-13 4:11
Al Chak13-Nov-13 4:11 
GeneralRe: goto statement Pin
Member 460889816-Nov-13 1:49
Member 460889816-Nov-13 1:49 
GeneralRe: goto statement Pin
Tarek Elqusi16-Nov-13 19:37
professionalTarek Elqusi16-Nov-13 19:37 
GeneralMy Saturday Pin
Michael Martin9-Nov-13 16:47
professionalMichael Martin9-Nov-13 16:47 
GeneralRe: My Saturday Pin
Septimus Hedgehog9-Nov-13 22:06
Septimus Hedgehog9-Nov-13 22:06 
GeneralRe: My Saturday Pin
OriginalGriff9-Nov-13 23:59
mveOriginalGriff9-Nov-13 23:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.