Click here to Skip to main content
15,908,931 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.

 
AnswerRe: Loop exit Pin
L. Braun31-Jul-14 0:10
L. Braun31-Jul-14 0:10 
GeneralRe: Loop exit Pin
Mark_Wallace31-Jul-14 0:17
Mark_Wallace31-Jul-14 0:17 
GeneralRe: Loop exit Pin
Mark_Wallace31-Jul-14 0:18
Mark_Wallace31-Jul-14 0:18 
GeneralRe: Loop exit Pin
Stefan_Lang31-Jul-14 0:34
Stefan_Lang31-Jul-14 0:34 
GeneralRe: Loop exit Pin
L. Braun31-Jul-14 1:40
L. Braun31-Jul-14 1:40 
GeneralRe: Loop exit Pin
Stefan_Lang31-Jul-14 3:24
Stefan_Lang31-Jul-14 3:24 
GeneralRe: Loop exit Pin
kalberts31-Jul-14 23:33
kalberts31-Jul-14 23:33 
GeneralRe: Loop exit Pin
Stefan_Lang3-Aug-14 23:50
Stefan_Lang3-Aug-14 23:50 
At this point I think we're down to the question of personal preference. Every language has some features that people like and are missing in other languages. People preferring those other languages may not consider those features as desirable. Maybe because the typical tasks they work on have no use for it, or maybe because the programming guidelines they're used to would not leave room for them.

Me, I don't see a need for exitwhile/exitfor in C/C++. I see sufficient alternatives, and while the risk for abuse is nowhere near the risk of statements like goto or #define macros, I'd still prefer to avoid it at the cost of slightly more verbose conditional code.

Then again, I'm biased by the kind of code I usually work with: there's no day that passes without me having to skim over unfamiliar code, so everything that isn't obvious from a quick glance on the code, makes it harder for me to do my job. Therefore I prefer the conditions listed in one place, at the start (or in case of a do loop, at the end) of the loop. Having to scan the entire loop body to find out what conditions may have caused the loop to end just means extra work for me. Therefore I try to avoid break and continue (not to mention goto). And for the same reason I wouldn't welcome exitwhile/exitfor.
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: Loop exit Pin
Eduard Matei31-Jul-14 0:59
Eduard Matei31-Jul-14 0:59 
GeneralRe: Loop exit Pin
Matthew Barnett31-Jul-14 1:20
Matthew Barnett31-Jul-14 1:20 
GeneralRe: Loop exit Pin
kalberts31-Jul-14 23:11
kalberts31-Jul-14 23:11 
GeneralRe: Loop exit Pin
M. Eugene Andrews31-Jul-14 1:53
M. Eugene Andrews31-Jul-14 1:53 
GeneralRe: Loop exit Pin
crazedDotNetDev31-Jul-14 5:59
crazedDotNetDev31-Jul-14 5:59 
GeneralRe: Loop exit Pin
kalberts31-Jul-14 22:58
kalberts31-Jul-14 22:58 
GeneralRe: Loop exit Pin
crazedDotNetDev1-Aug-14 10:34
crazedDotNetDev1-Aug-14 10:34 
GeneralRe: Loop exit Pin
Member 460889831-Jul-14 5:58
Member 460889831-Jul-14 5:58 
GeneralRe: Loop exit Pin
kalberts31-Jul-14 22:57
kalberts31-Jul-14 22:57 
GeneralRe: Loop exit Pin
dg6yhw1131-Jul-14 7:25
dg6yhw1131-Jul-14 7:25 
GeneralRe: Loop exit Pin
Frank Malcolm31-Jul-14 15:40
Frank Malcolm31-Jul-14 15:40 
GeneralRe: Loop exit Pin
kalberts31-Jul-14 22:19
kalberts31-Jul-14 22:19 
GeneralRe: Loop exit Pin
Frank Malcolm1-Aug-14 13:57
Frank Malcolm1-Aug-14 13:57 
GeneralDoing an interview today PinPopular
glennPattonWork329-Jul-14 22:49
professionalglennPattonWork329-Jul-14 22:49 
GeneralRe: Doing an interview today Pin
Argonia29-Jul-14 22:50
professionalArgonia29-Jul-14 22:50 
GeneralRe: Doing an interview today Pin
glennPattonWork329-Jul-14 22:57
professionalglennPattonWork329-Jul-14 22:57 
GeneralRe: Doing an interview today Pin
OriginalGriff29-Jul-14 22:50
mveOriginalGriff29-Jul-14 22:50 

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.