"with" still sucks + removing features + adding features
Jarrett Billingsley
jarrett.billingsley at gmail.com
Mon May 18 20:12:26 PDT 2009
On Mon, May 18, 2009 at 1:57 PM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
>>> of the enum. Regular switch gets ranged cases by the syntax case a: ..
>>> case
>>> b: (I've always thought switch would be greatly helped by that).
>>
>> Kind of an odd syntax. Why not "case a .. b:"? Parsing issues?
>
> It's consistency. Everywhere in the language a .. b implies b is excluded.
> In a switch you want to include b. So I reflected that in the syntax. In
> fact, I confess I'm more proud than I should be about that little detail.
Well after all this discussion, I think I like your syntax after all
:P In fact, I might be inclined to use it in MiniD. It already has
ranged cases of the form "case a .. b:" but the inconsistency between
it being inclusive and slices being inclusive has never sat well with
me.
More information about the Digitalmars-d
mailing list