Another day in the ordeal of cartesianProduct

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Oct 27 06:03:53 PDT 2012


On 10/27/12 6:20 AM, Peter Alexander wrote:
> On Friday, 26 October 2012 at 22:43:44 UTC, H. S. Teoh wrote:
>> I'm getting a bit frustrated with the Phobos bugs related to ranges and
>> std.algorithm. I think we need to increase the number of unittests. And
>> by that I mean, GREATLY increase the number of unittests. Most of the
>> current tests are merely sanity tests for the most common usage
>> patterns, most basic types, or tests added as a result of fixed bugs.
>>
>> This is inadequate.
>
> Unit tests are not the solution to this. There are too many range
> combinations and types to effectively unit test everything.

Agreed.

> What we need
> is proper semantic support for ranges (and other conceptual classes of
> types). For example, this should not compile:
>
> void foo(Range)(Range r) if (isForwardRange!Range)
> {
> r.popBack();
> }

No, this has nothing to do with the problem at hand.


Andrei



More information about the Digitalmars-d mailing list