dmd 1.046 and 2.031 releases

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jul 7 12:29:43 PDT 2009


Leandro Lucarella wrote:
> Andrei Alexandrescu, el  7 de julio a las 13:18 me escribiste:
>> Jérôme M. Berger wrote:
>>> Andrei Alexandrescu wrote:
>>>> Derek Parnell wrote:
>>>>> It seems that D would benefit from having a standard syntax format for
>>>>> expressing various range sets;
>>>>> a. Include begin Include end, i.e. []
>>>>> b. Include begin Exclude end, i.e. [)
>>>>> c. Exclude begin Include end, i.e. (]
>>>>> d. Exclude begin Exclude end, i.e. ()
>>>> I'm afraid this would majorly mess with pairing of parens.
>>>>
>>>    I think Derek's point was to have *some* syntax to mean this, not 
>>> necessarily the one he showed (which he showed because I believe that's the 
>>> "standard" mathematical way to express it for English speakers). For example, we 
>>> could say that [] is always inclusive and have another character which makes it 
>>> exclusive like:
>>> a. Include begin Include end, i.e. [  a .. b  ]
>>> b. Include begin Exclude end, i.e. [  a .. b ^]
>>> c. Exclude begin Include end, i.e. [^ a .. b  ]
>>> d. Exclude begin Exclude end, i.e. [^ a .. b ^]
>> I think Walter's message really rendered the whole discussion moot. Post of the 
>> year:
>>
>> =========================
>> I like:
>>
>>    a .. b+1
>>
>> to mean inclusive range.
>> =========================
>>
>> Consider "+1]" a special symbol that means the range is to be closed to the right 
>> :o).
> 
> What about bearophile response: what about x..uint.max+1?

How often did you encounter that issue?


Andrei


More information about the Digitalmars-d-announce mailing list