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

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 15:57:01 PDT 2015


On 10/08/2015 10:08 PM, Kagamin wrote:
> OK, I thought a little more and... Name: divisible range. It occurred to
> me that we only need to reverse logic of bidirectional range: while
> bidirectional range is a pair of ranges that shrink towards each other,
> divisible range is divided into two ranges that shrink away from each
> other. The C++ example implies that begin and end must be bidirectional
> iterators, but that is not really needed as they are used for bounds
> checks only, ranges have empty for that, so the divisible range can be a
> normal input range that provides access to its left part that shrinks
> from back (backward input range?) and provides access to the right part.

Isn't this the same as my suggestion?
http://forum.dlang.org/post/mv3q34$bbg$1@digitalmars.com

If not, what is the difference?


More information about the Digitalmars-d mailing list