D's Auto Decoding and You

Jonathan M Davis via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu May 19 05:15:14 PDT 2016


On Thursday, May 19, 2016 09:05:53 Kagamin via Digitalmars-d-announce wrote:
> On Wednesday, 18 May 2016 at 20:10:09 UTC, Jonathan M Davis wrote:
> > So, while we do have enforcement of how ranges _can_ be used,
> > we don't have enforcement of how they _are_ used, and I don't
> > expect that we'll ever get that.
>
> It would help if there was documented standard testing procedure
> (and used for all algorithms).

We really need solid tools for testing an algorithm with a variety of ranges
to verify that it's doing the right thing as well as tools to test that a
range behaves how ranges are supposed to behave. The closest that we have to
that is that std.range has some internal helpers for testing ranges, but
they're not that great, and I don't think that any of it's public. And we
don't have anything for testing that a range acts correctly - just that it
follows the right API syntactically with the minimal semantic checking that
can be done with typeof. So, there's work to be done. I'd started some of it
a while back, but I never got very far, and no one else has done anything
like it AFAIK.

- Jonathan M Davis



More information about the Digitalmars-d-announce mailing list