Case Range Statement ..

Nick Sabalausky a at a.a
Tue Jul 7 02:15:30 PDT 2009


"Daniel Keep" <daniel.keep.lists at gmail.com> wrote in message 
news:h2uoju$5f1$1 at digitalmars.com...
>
> And heeeeere we go again!
>
> *sigh*
>
>> switch( foo )
>> {
>>     case 0:
>>     ..
>>     case 5:
>>         blah();
>>         break;
>>
>>     default:
>>         bork();
>> }
>
> Doesn't look so bad, does it?  For the record, I think the current
> syntax is ugly.  But:
>
> * it WORKS,
> * it is reasonably distinct from all the other uses of ".." which have a
> DIFFERENT MEANING,
> * it has an easily-explained rationale: "the .. stands in for the case
> labels you would have written."
>
> Can we please, please stop the useless bike-shedding on this NG?  Yes,
> it's a bit ugly, but all the alternatives proposed have SEMANTIC issues
> with them, which is much worse.

I like bike sheds. 





More information about the Digitalmars-d mailing list