"with" still sucks + removing features + adding features

Bill Baxter wbaxter at gmail.com
Mon May 18 16:15:15 PDT 2009


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?

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.

--bb



More information about the Digitalmars-d mailing list