RFC on range design for D2

Benji Smith dlanguage at benjismith.net
Thu Sep 11 06:06:25 PDT 2008


Andrei Alexandrescu wrote:
> What I wanted was to make sure ranges are appropriate as higher-level 
> abstractions that can replace STL-like iterators. My experience shows 
> that they can. Not on 100% of occasions have they been a superior 
> replacement, but I'm looking at a solid 80s at least. Add to that the 
> advantage of better generators (which iterators make unpalatable because 
> of the unsightly dummy end() requirement). When I also add the safety 
> advantage of sinks (no more buffer overruns!!!), I feel we have a huge 
> winner.

I agree.

My quibble with the name "range" is pretty minor, and I don't have any 
qualm with the semantics.

And "range" is certainly a better name for an iteration metaphor than 
"opApply".

:-)

--benji


More information about the Digitalmars-d-announce mailing list