Iterators for D

Georg Wrede georg.wrede at nospam.org
Tue Nov 7 02:56:22 PST 2006


Walter Bright wrote:
> Sean Kelly wrote:
> 
>> Is there really any reason to support pointers as iterators though?  
>> C++ libraries even seem to be moving away from that towards more 
>> robust and less error-prone iterator objects.
> 
> 
> Can you be more specific about what the problems and solutions are?

For one thing, if pointers still are supported, then all algorithms have 
to be written so they can use them.

If we skip "real pointer compatibility", then we can decide on smarter 
iterators.

Example:

With pointer-compatible iterators, it is impossible to traverse the tree.

With smarter iterators one could.



More information about the Digitalmars-d mailing list