std.container & ranges

Jonathan M Davis jmdavisProg at gmx.com
Thu Nov 3 01:03:19 PDT 2011


On Thursday, November 03, 2011 16:41:27 Mike Parker wrote:
> 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.

It's quite clear that we need to do a better job getting the concept of ranges 
across (probably with at least one explanatory article) and that 
std.container's documentation needs improvement.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list