Ranges and/versus iterators

clueless bystander clueless at bystander.com
Tue Mar 23 04:58:56 PDT 2010


Lars T. Kyllingstad Wrote:

> clueless bystander wrote:
> > Watching D evolve from the outside there seems to be a lot of ongoing discussion
> > on this newsgroup about the D range idiom which is somehow opposed to conventional
> > thinking about iterators.
> > 
> > Can someone please explain in plain words just exactly what a range is and how
> > it differs from the iterator concept (if that's appropriate???) and what are the benefits
> > from a data modeling and access perspective.
> > 
> > Sure, I'm clueless, though suspect many other bystanders would appreciate a
> > succinct heads-up.
> > 
> > Thanks,
> > clueless bystander
> 
> 
> I'm probably not the right person to answer your question, since I have 
> virtually no experience with C++ iterators.  Instead I'll just refer you 
> to Andrei's own article on the subject:
> 
>    http://www.informit.com/articles/article.aspx?p=1407357
> 
> Please don't hesitate to ask again if it didn't clear things up for you. :)
> 
> -Lars

Yes, well, thanks again.  The first 7 pages seemed to have plausible arguments
but the going get tough thereafter.  Maybe the reason ranges are not popular
is that they are hard to explain even though they might be simple and obvious
in hindsight.

Sigh,
c.b.




More information about the Digitalmars-d mailing list