Jonathan M Davis Wrote: > Sean Kelly wrote: > > > > It's a small thing, but I think "continue switch" could be misleading. > > Consider this: > > > > switch (getState()) { > > case X: > > setState(Z); > > continue switch; > > case Y: > > break; > > case Z: > > writeln( "done!" ); > > } > > > > Having never encountered D before, what would be your interpretation of > > this code? > > I hadn't thought of that. That could be a source of confusion. However, > since a switch statement isn't a loop, and it's not a construct in any other > language AFAIK, the person will look it up ... > Personally, I think that the fact that it's less error prone alone makes it > a better choice even if it were somewhat less clear.
I'm inclined to agree. This is just the first thing that popped into my mind when I saw "continue switch" and I figured I'd bring it up.