Case Range Statement ..

Daniel Keep daniel.keep.lists at gmail.com
Mon Jul 6 23:08:42 PDT 2009


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.



More information about the Digitalmars-d mailing list