dmd 1.046 and 2.031 releases
Walter Bright
newshound1 at digitalmars.com
Mon Jul 6 21:29:43 PDT 2009
Derek Parnell wrote:
> However, that aside, the syntax you have chosen will have a rational
> explanation for its superiority. So can you explain in simple terms why
>
> CaseLabelInt .. CaseLabelInt eg. case 1: .. case 9:
>
> is superior than
>
> case CaseRange: eg. case 1 .. 9:
>
> given that
> CaseLabelInt ==> case IntegerExpression :
> CaseRange ==> IntegerExpression .. IntegerExpression
Because
1. case X..Y:
looks like
2. foreach(e; X..Y)
3. array[X..Y]
yet the X..Y has a VERY DIFFERENT meaning. (1) is inclusive of Y, and
(2) and (3) are exclusive of Y.
Having a very different meaning means it should have a distinctly
different syntax.
More information about the Digitalmars-d-announce
mailing list