"with" still sucks + removing features + adding features
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon May 18 17:31:23 PDT 2009
Bill Baxter wrote:
> On Mon, May 18, 2009 at 4:02 PM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>> Bill Baxter wrote:
>>> On Mon, May 18, 2009 at 3:29 PM, Jason House
>>> <jason.james.house at gmail.com> wrote:
>>>
>>>> It's all a matter of perspective. I see both as begin .. end. That may be
>>>> the same reason why I think addition when I see foo(bar()) + baz(37). The
>>>> extra cruft is more or less ignored when figuring out the basics of what is
>>>> going on.
>>> Agreed. If you tell someone a .. b means a non-inclusive range
>>> from a to b, then ask them to guess what blarf a .. blarf b means,
>>> I would be very surprised if many guessed "inclusive range from blarf
>>> a to blarf b".
>> 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?
It has been a keyword with a specific meaning for many years. That's
bound to mean something.
> I don't think it's a terrible syntax, but I wouldn't go as far as to
> call it elegant. I'm with bear that it would be better if we could
> come up with some syntax that means "inclusive range" everywhere.
> Rather than introducing special cases. Special cases are generally a
> sign that something has gone wrong in a language design.
I completely disagree that that's a special case. ".." is punctuation.
You can't pretend punctuation has the same meaning everywhere in a
programming language.
Andrei
More information about the Digitalmars-d
mailing list