On 24.07.2017 20:19, Suliman wrote:
Why D have two function `contains` and `canFind`
`contains` guarantees logarithmic running time, while `canFind` can be
linear.
On Monday, 24 July 2017 at 19:53:34 UTC, Cym13 wrote:
On Monday, 24 July 2017 at 18:31:09 UTC, Ali Çehreli wrote:
On 07/24/2017 11:19 AM, Suliman wrote:
> [...]
only
> [...]
std.algorithm.canFind and std.range.SortedRange.contains:
[...]
I'm gessing this predates design by introspection as
On Monday, 24 July 2017 at 18:31:09 UTC, Ali Çehreli wrote:
On 07/24/2017 11:19 AM, Suliman wrote:
> [...]
only
> [...]
std.algorithm.canFind and std.range.SortedRange.contains:
[...]
I'm gessing this predates design by introspection as it would be
cleaner to let the compiler do the switch
On 07/24/2017 11:19 AM, Suliman wrote:
> Why D have two function `contains` and `canFind` if C# have only
> contains and it's enough?
std.algorithm.canFind and std.range.SortedRange.contains:
https://dlang.org/phobos/std_algorithm_searching.html#.canFind
https://dlang.org/
Why D have two function `contains` and `canFind` if C# have only
contains and it's enough?