Rewrite of std.range docs (Was: Re: Making sense of ranges)

Marco Leise Marco.Leise at gmx.de
Tue Mar 27 03:26:41 PDT 2012


Am Tue, 27 Mar 2012 06:00:58 +0200
schrieb "Jesse Phillips" <jessekphillips+D at gmail.com>:

> On Monday, 26 March 2012 at 00:50:32 UTC, H. S. Teoh wrote:
> 
> > This thread has further convinced me that std.range's docs 
> > *need* this
> > rewrite. So here's my first attempt at it:
> >
> > 	https://github.com/quickfur/phobos/tree/stdrange_docs
> 
> I find that opening to be much better. Look forward to the 
> improvement.

I agree. To the newcomer it is now easy to see the rationale behind ranges and why they should take the time to understand the concept. What I missed when I started with D, was some explanation that the returned ranges from many algorithms are compile time generated structs. I often found myself wondering why I don't get an array returned when I put one into the algorithm and had to do array(...) all over the place, when actually I could often have passed on the ranges directly to a following foreach or similar.

"Ranges whose elements are sorted affords ..." <- insert a comma before affords perhaps? It would help non-native speakers.

-- 
Marco



More information about the Digitalmars-d-learn mailing list