"with" still sucks + removing features + adding features

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 18 17:33:35 PDT 2009


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.


Andrei



More information about the Digitalmars-d mailing list