About switch case statements...
Denis Koroskin
2korden at gmail.com
Mon Nov 16 05:22:42 PST 2009
On Mon, 16 Nov 2009 15:48:16 +0300, Justin Johansson <no at spam.com> wrote:
> 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
>
> I don't know about "forcing people" to write such but perhaps it could
> be an "option for people" :-)
>
> Actually I quite like the brevity you propose but would it be a
> challenge for the comma operator?
>
> While ago, I got D multi-dimensional array syntax messed up and declared
> such an animal as
> int[3,4,5] which effectively ended up declaring the beast as int[5].
>
> Cheers
> Justin
>
>
Wow, this definitely needs to be bug-reported!
More information about the Digitalmars-d
mailing list