December 17, 2022 [Issue 17679] SortedRange.contains should be deprecated in favor of the generic canFind | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17679 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P4 -- |
November 27, 2023 [Issue 17679] SortedRange.contains should be deprecated in favor of the generic canFind | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=17679 Nick Treleaven <nick@geany.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |nick@geany.org Resolution|--- |INVALID --- Comment #1 from Nick Treleaven <nick@geany.org> --- Closing as having both is intentional. Generic code may need `contains` to guarantee complexity. The alternative: > The Achilles's heel of checking for SortedRange is that not only sorted ranges have fast contains - a variety of hashed containers come to mind. Any range with fast searching should implement contains. Discussion starts here: https://github.com/dlang/phobos/pull/5651#issuecomment-317558570 -- |
Copyright © 1999-2021 by the D Language Foundation