More flexible sorted ranges?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Nov 2 09:21:03 PST 2014


On Sunday, 2 November 2014 at 16:59:30 UTC, bearophile wrote:
> Ola Fosheim Grøstad:
>
>> Shouldn't sorted range maintain the invariant automatically in 
>> order to remain typesafe?
>
> Yes, of course.

If SortedRange is fixed, please also switch the names of 
upperBound and lowerBound… They are currently wrong. An 
upperBound on something should return the values lower than it 
and a lowerBound should return values larger…

(C++ got it right).


More information about the Digitalmars-d-learn mailing list