"the last change" for ranges

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed May 20 11:39:31 PDT 2009


Robert Fraser wrote:
> dsimcha wrote:
>> Also, while we're fine tuning input
>> ranges vs. forward ranges, I think the concept of iterables as a 
>> catch-all for
>> ranges, opApply, builtins, etc. needs to be introduced and fine tuned, 
>> too.  We've
>> shown on this NG previously that, while ranges are usually preferable 
>> for the
>> flexibility they offer, opApply does have its legitimate use cases.
> 
> An input/forward range is basically just another name/syntax for an 
> iterable. Perhaps algorithms that work on input ranges should be written 
> using foreach instead of front/popFront?

For most, foreach is not sufficient.

Andrei



More information about the Digitalmars-d mailing list