"with" still sucks + removing features + adding features

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 18 19:29:38 PDT 2009


Rainer Deyke wrote:
> Bill Baxter wrote:
>> 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".
> 
> Agreed.
> 
> Although non-inclusive ranges are common enough that they deserve their
> own syntax, I think inclusive ranges are *also* important enough to
> deserve their own syntax.  Writing '+1' is often error-prone or even
> just plain wrong (such as when it leads to integer overflow).
> 
> I favor the syntax 'a ... b' for inclusive ranges.  It's easy to read
> and similar to 'a .. b' without being too similar.

I swear I didn't see the difference til the third read. I thought you 
were kidding.

Even Perl would turn its nose at a significant semantic difference 
brought by the third period.


Andrei



More information about the Digitalmars-d mailing list