Case Range Statement ..

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jul 7 09:01:12 PDT 2009


Leandro Lucarella wrote:
> Andrei Alexandrescu, el  7 de julio a las 10:19 me escribiste:
>> Token meaning has ALWAYS depended on context. ALWAYS.
> 
> I can use the exact same argument for using case X..Y: then =)

You could, but it would be much more of a stretch. This is because 
expression1..expression2 is already a grammatical construct, so we're 
not talking only about one token anymore.

> At least let's agree one is as arbitrary as the other...

No. I don't agree at all.

> I can live with
> that syntax if you (people who likes case X: .. case Y: is better) accept
> that is just a cosmetic issue and you like your syntax better (and since
> who make the decisions likes it better, it will stay like that).

"case X: .. case Y:" is a cosmetic issue over e.g "case X .. case Y:" 
but is worlds better than "case X .. Y" and most or all other suggested 
syntaxes.

> Can you at least use:
> case X:
> ..
> case Y:
> 
> in the examples/documentation/specs? I think most case X: .. case Y:
> haters found that format pretty acceptable, so we can all be a little
> happier =)

To me they look the same, but if people are happier with wasting 
vertical space, sure.


Andrei



More information about the Digitalmars-d mailing list