"with" still sucks + removing features + adding features

Bill Baxter wbaxter at gmail.com
Mon May 18 18:04:05 PDT 2009

On Mon, May 18, 2009 at 5:33 PM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Bill Baxter wrote:
>> On Mon, May 18, 2009 at 4:15 PM, Bill Baxter <wbaxter at gmail.com> wrote:
>>>> But it's not "blarf". It's "case". I am floored that nobody sees the
>>>> elegance of that syntax.
>>> So your argument is that "case" inherently deserves a special case?
>> Thinking about it more, I guess you must actually be seeing it as a
>> rule of   " '..' always does the most useful thing", and the most
>> useful thing for switches is inclusive.
> No! If I thought that, I would have said this is fine:
> case 'a' .. 'z':
> It is NOT fine because 'a' .. 'z' means one thing here and a different thing
> in another place. So I went for:
> case 'a': .. case 'z':
> specifically because case 'a': .. case 'z': does NOT have any meaning
> anywhere else.

Well, I'm floored that you find that at all elegant.  It's "elegant"
in much the same way using static to mean 12 different things,
depending upon context, is "elegant".   Although here it's worse I'd
say because the meaning is so much closer to the other meaning, so the
expectation of matching behavior is greater.  But maybe you dig on
that kind of thing.  I see it as a necessary evil.  Not something to
go strutting around proudly about.

Dat's all I'm gonna say about it though.  I've had my fill on this one.


More information about the Digitalmars-d mailing list