dmd 1.046 and 2.031 releases

Walter Bright newshound1 at digitalmars.com
Mon Jul 6 11:04:48 PDT 2009


grauzone wrote:
> Walter Bright wrote:
>> のしいか (noshiika) wrote:
>>> But I am a bit disappointed with the CaseRangeStatement syntax.
>>> Why is it
>>>    case 0: .. case 9:
>>> instead of
>>>    case 0 .. 9:
> 
> Or
>     case [0..10]:
> ?
> 
> Compatible to how list slicing works.
> 
> Ah yes, bikeshed issue, but my solution is more beautiful.

No, it isn't compatible. [0..10] for slices does not include the 10, 
while the case range does. Using Andrei's syntax clearly makes the point 
that it is different, and not confusingly similar to something very 
different.


More information about the Digitalmars-d-announce mailing list