Another day in the ordeal of cartesianProduct
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Oct 27 06:00:13 PDT 2012
On 10/26/12 6:45 PM, H. S. Teoh wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=8900
>
> :-(
>
> (The code there is called cartesianProd but it's the reduced code, so it
> doesn't really compute the cartesian product. But that's where it's
> from.)
>
> So far, the outstanding blockers for cartesianProduct are:
> 1) Compiler bug which causes unittest failure:
>
> std/range.d(4629): Error: variable lower used before set
> std/range.d(4630): Error: variable upper used before set
>
> (Jonathan had a pull request with a Phobos workaround for this, which I
> _think_ is already merged, but the autotester is still failing at this
> point. :-/)
>
> 2) Issue 8542 (crosstalk between template instantiations)
>
> 3) And now, issue 8900 (zip fails to compile with repeat(char[]))
>
> So there's still no joy for cartesianProduct. :-(
Often when there are many issues caused by a specific artifact, there
are only a couple of compiler bugs manifesting themselves in various
unpredictable ways.
> 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.
I don't think that's the best way. Walter and I have had a lasting
disagreement about this as he firmly believes unittests are the way to
make sure the compiler works well. In my opinion the psychological
effect has been negative because this outlook has caused
incompletely-defined features to get implemented (in a latent
expectation that unittests will cause any issues to be detected).
Andrei
More information about the Digitalmars-d
mailing list