[Issue 15230] Inconsistent std.range.SortedRange predicate checks
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Oct 26 00:36:52 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15230
--- Comment #2 from John Colvin <john.loughran.colvin at gmail.com> ---
(In reply to Jack Stouffer from comment #1)
> I would consider this as "working as intended", as the checks are only
> supposed to happen in debug mode. In a PR of mine, I asked @schveiguy if it
> made any sense to have any checks in a function that is supposed to be
> assuming something. He said it's strange, but it's nice to have something
> that double checks for you, in debug mode only.
It's fine to have extra runtime checks in debug mode that check data, but I
think the API should not change. The predicate should either always be verified
to be valid or be optional.
--
More information about the Digitalmars-d-bugs
mailing list