Click here to Skip to main content
15,913,773 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
Mark_Wallace10-Nov-13 20:47
Mark_Wallace10-Nov-13 20:47 
GeneralRe: goto statement Pin
Mark H210-Nov-13 21:56
Mark H210-Nov-13 21:56 
GeneralRe: goto statement Pin
Stefan_Lang10-Nov-13 23:24
Stefan_Lang10-Nov-13 23:24 
GeneralRe: goto statement Pin
vl211-Nov-13 7:49
vl211-Nov-13 7:49 
GeneralRe: goto statement Pin
jaybus5610-Nov-13 22:11
jaybus5610-Nov-13 22:11 
GeneralRe: goto statement Pin
Stefan_Lang10-Nov-13 23:13
Stefan_Lang10-Nov-13 23:13 
GeneralRe: goto statement Pin
vl211-Nov-13 7:46
vl211-Nov-13 7:46 
GeneralRe: goto statement Pin
Stefan_Lang11-Nov-13 20:30
Stefan_Lang11-Nov-13 20:30 
Tools can only get you so far, and they're not suitable for prooving code correctness. So I'm not sure why you brought that up.

As for benefits, I've read and taken part in countless discussions, and not a single example brought up managed to convince me. In every single case there was a suitable alternative using standard control statements. Most of the time the person bringing up either didn't come up with the proper way, or considered the effort of writing 2-5 additional lines of code too much to bear.

Based on that experience I'm convinced that there is always a better alternative. People claiming otherwise are just not sufficiently experienced to see it, or understand the need.


That said, all this assumes you're looking at code where proper coding guidelines and style even makes sense to take care of: if you're just programming away a piece of throw-away-code, then yes, use whatever suits you best and solves the problem.

In actual production code that is going to live through years of maintenance and adding features, the presumed benefits of goto never outweigh the long term maintenance problems.
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. (Fran Poretto)

GeneralRe: goto statement Pin
vl212-Nov-13 0:44
vl212-Nov-13 0:44 
GeneralRe: goto statement Pin
jschell12-Nov-13 9:56
jschell12-Nov-13 9:56 
GeneralRe: goto statement Pin
Stefan_Lang12-Nov-13 21:19
Stefan_Lang12-Nov-13 21:19 
GeneralRe: goto statement Pin
jschell13-Nov-13 10:27
jschell13-Nov-13 10:27 
GeneralRe: goto statement Pin
Stefan_Lang13-Nov-13 21:07
Stefan_Lang13-Nov-13 21:07 
GeneralRe: goto statement Pin
jschell14-Nov-13 7:54
jschell14-Nov-13 7:54 
GeneralRe: goto statement Pin
Stefan_Lang14-Nov-13 23:15
Stefan_Lang14-Nov-13 23:15 
GeneralRe: goto statement Pin
jschell15-Nov-13 12:28
jschell15-Nov-13 12:28 
GeneralRe: goto statement Pin
Stefan_Lang17-Nov-13 21:29
Stefan_Lang17-Nov-13 21:29 
GeneralRe: goto statement Pin
jschell18-Nov-13 8:13
jschell18-Nov-13 8:13 
GeneralRe: goto statement Pin
Stefan_Lang13-Nov-13 21:22
Stefan_Lang13-Nov-13 21:22 
GeneralRe: goto statement Pin
jschell18-Nov-13 8:17
jschell18-Nov-13 8:17 
GeneralRe: goto statement Pin
Stefan_Lang18-Nov-13 20:54
Stefan_Lang18-Nov-13 20:54 
GeneralRe: goto statement Pin
jschell19-Nov-13 10:39
jschell19-Nov-13 10:39 
GeneralRe: goto statement Pin
Stefan_Lang19-Nov-13 22:33
Stefan_Lang19-Nov-13 22:33 
GeneralRe: goto statement Pin
jschell20-Nov-13 9:54
jschell20-Nov-13 9:54 
GeneralRe: goto statement Pin
Bill_Hallahan11-Nov-13 17:39
Bill_Hallahan11-Nov-13 17:39 

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.