Checking function parameters in Phobos

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Nov 20 08:18:04 PST 2013


On 11/20/13 6:14 AM, Timon Gehr wrote:
> Yes, hence SortedRange being sorted is just a convention in any case.

That's right. In particular we can't have assumeSorted check for 
isSorted even at the point of creation, and even with debug-only 
asserts. This is because checking would change the complexity of binary 
search and related algorithms, which is often prohibitive.

Andrei



More information about the Digitalmars-d mailing list