Iterators for D

Walter Bright newshound at digitalmars.com
Mon Nov 6 15:12:46 PST 2006


Sean Kelly wrote:
> Is it worth discussing whether the pointer-style C++ iterators are the 
> best approach?  They certainly are if random access iterators are a 
> requirement, but if we're just implementing forward and reverse 
> iterators, the all-in-one Java approach may be better.  In that vein, I 
>  assume alose that reverse iteration would work with reverse iterators 
> and an .rbegin type method instead of .begin and foreach_reverse?

Hmm, or it could be done starting with .end and going to .begin.



More information about the Digitalmars-d mailing list