A safer switch?

Vladimir Panteleev thecybershadow at gmail.com
Mon Oct 12 02:14:04 PDT 2009


On Mon, 12 Oct 2009 11:03:13 +0300, bearophile <bearophileHUGS at lycos.com>  
wrote:

> This is a pruned method from a command-line Java program:

(snip)

This was discussed before. IIRC, someone suggested to force using a  
control-flow keyword (break/continue/goto) at the end of a case. Using  
"continue" to fall through was rejected because it changes its meaning  
when there's a switch in a loop. You'd use goto <value> to jump to the  
particular (next) switch case.

-- 
Best regards,
  Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list