Few things

Robert Fraser fraserofthenight at gmail.com
Fri Aug 3 08:57:02 PDT 2007


> Doesn't
> 
> for (c;;) {
>    switch (c) {
>    case 'a': continue;
>    case 'b': break;
>    }
> }
> 
> already have a meaning?

That always bothered me: break and continue both have similar meanings in every place they're used (in loops), except if there's a switch statement, where suddenly break no longer works to break the loop but continue does. I'd very much like to see continue mean fall-through, but if that's not an option, making an unlabeled continue in a switch an error would help increase orthagonality.



More information about the Digitalmars-d mailing list