Shout out to D at cppcon, when talkign about ranges.
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 12 00:08:17 PDT 2015
On Saturday, 10 October 2015 at 22:06:31 UTC, Andrei Alexandrescu
wrote:
> So there was knowledge of said long history of ranges in C++.
> Far as I can tell >"Iterators Must Go" was immediately and
> universally recognized as a turning point in >how people
> approached getting work done using ranges.
You've already published the background for your library approach
here:
http://www.informit.com/articles/article.aspx?p=1407357&seqNum=4
Which basically states the foundation: GoF iterators + STL. So
you've already killed the novelty game yourself.
GoF patterns is just an attempt to describe _common_ patterns in
software design. Stepanov "C++ pointer-iterators" was an attempt
to break away from the heavier GoF iterators (which D calls
ranges) with something more lightweight.
If one tries to enumerate all kinds of types of iterators one
will end up with a combinatorial explosion, so much for
generality. Stepanovs approach was probably also an attempt to
get away from this combinatorial explosion by providing
pointer-semantics instead.
One of the most important and convenient iterators (which C++
fails to deliver) are what GoF calls "roboust iterators":
iterators that allow deletions. To get there safely and
conveniently iterators have to be made a language feature, since
it requires static analysis in the general case, IMO.
Want to innovate? Provide language support.
More information about the Digitalmars-d
mailing list