std.container & ranges

Mike Parker aldacron at gmail.com
Thu Nov 3 00:41:27 PDT 2011


On 11/2/2011 10:41 PM, Steven Schveighoffer wrote:
>

> Then your specific application can use std.algorithm.find to implement
> the equivalent. Only the algorithm body changes, not the usage of the
> algorithm.
>

This is the root of the problem. How are we supposed to know that we 
need something from std.algorithm to remove something from a container 
in std.container? It's non-intuitive and non-obvious unless you already 
have more than a passing familiarity with ranges. If we can't have 
remove(element) on a container, then we need some good documentation in 
the std.container module that points the way.


More information about the Digitalmars-d-learn mailing list