Iterators for D

Walter Bright newshound at digitalmars.com
Mon Nov 6 22:06:14 PST 2006


Knud Sørensen wrote:
> On Mon, 06 Nov 2006 12:46:01 -0800, Walter Bright wrote:
> 
>> It's becoming increasingly obvious that D needs iterators. While opApply 
>>   is far better for some kinds of iteration (such as recursively 
>> traversing a directory), iterators are more efficient in some cases, and 
>> allow for things that opApply makes difficult.
>>
> 
> What are those cases ? Maybe we can find a way to fix the problem with
> opApply.

One such case is the usefulness of being able to provide an input 
iterator to a parsing function, which may itself pass the iterator off 
to other parsing functions.



More information about the Digitalmars-d mailing list