"with" still sucks + removing features + adding features

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 18 21:36:51 PDT 2009


Derek Parnell wrote:
> I'm a bit confused. Are you saying that one must expect that the meaning of
> punctuation in a programming language depends on the context the
> punctuation is found in?
> 
> If so, then ".." in "[a .. b]" can mean exclusive range and ".." in "case a
> .. b:" can mean inclusive range, no?

No, you don't understand. But I sworn that I'll explain it for the last 
time in another post, so I'm out of times I can explain it.

Let me make a separate point. With "...", people just defined the space 
operator. What's the space operator? Changes the meaning of 0...10 in 
two distinct ways:

0...10 is an all-inclusive integer range from 0 to 10
0. ..10 is a right-open floating-point range from 0 to 10
0.. .10 is a right-open floating-point range from 0 to 0.1

Not to mention:

0.....10 is an all-inclusive floating-point range from 0 to .1 (if I 
counted my dots right).

I have no doubt somebody will find this all intuitive and pleasing on 
the eye, and will suggest a couple of additional constructs and keywords 
to improve things.


Andrei



More information about the Digitalmars-d mailing list