Switch-case made less buggy, now with PATCH!

Tim Matthews tim.matthews7 at gmail.com
Fri Nov 20 22:15:18 PST 2009


Leandro Lucarella wrote:
> 
> There is already goto case; (without specifying the case) for that, at
> least in the specs :)
> 
> http://www.digitalmars.com/d/2.0/statement.html#GotoStatement
> 
> GotoStatement:
>    goto Identifier ;
>    goto default ;
>    goto case ;
>    goto case Expression ;
> 
> [...]
> 
> The third form, goto case;, transfers to the next CaseStatement of the
> innermost enclosing SwitchStatement.
> 

Which is a very in your face explicit fall through. So we understand the 
advantages of making fall through explicit yet for some reason we need 
to have a more discreet kind of explicit syntax?



More information about the Digitalmars-d mailing list