About switch case statements...
Don
nospam at nospam.com
Mon Nov 16 05:34:37 PST 2009
bearophile wrote:
> Don:
>
>> (providing that empty fall-through case statements remain valid;
>> disallowing them would be really annoying).
>
> What's bad about forcing people to write:
> case A, B, C:
>
> Instead of:
> case A:
> case B:
> case C:
> ?
>
> Bye,
> bearophile
(1) "case A, B, C:" implies a relationship between A, B, and C, which
might not exist. They may have nothing in common.
(2) it's an extremely common coding style in C, C++.
(3) it's more difficult to read.
More information about the Digitalmars-d
mailing list