Shout out to D at cppcon, when talkign about ranges.

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 5 23:29:52 PDT 2015


On Tuesday, 6 October 2015 at 02:31:53 UTC, Eric Niebler wrote:
> On Monday, 5 October 2015 at 21:57:31 UTC, Walter Bright wrote:
>> Yes, you can build debug iterators that know their limits, or 
>> iterators with back pointers to the range. This is not an 
>> inherent property of Boost ranges, does not appear in the 
>> Boost description of ranges (unless I missed it), and is a 
>> kludge. I do not agree that D ranges owe anything to that 
>> design.
>
> The design of the D ranges and algorithms owe quite a lot to 
> C++, and I've heard Andrei say as much. Stepanov did the hard 
> work of defining common algorithms in terms of iterators of 
> different strength. Given that starting point, ranges of 
> different strength are an "obvious" next step that many people 
> thought up independently. D took it one way and C++ went 
> another.

D's ranges and their use in D's standard library owe a _lot_ to 
C++ - especially to the STL. They just don't owe anything to 
Boost's ranges. They're two different paths from the same root.

> When designing my range library, I looked at all the prior art 
> available to me including D ranges and decided D's path was not 
> the right one for C++. My work is based on Boost.Range.

It'll be interesting to see where that goes.

- Jonathan M Davis


More information about the Digitalmars-d mailing list