RFC on SlidingSplitter Range
monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Oct 3 09:32:22 PDT 2014
On Friday, 3 October 2014 at 15:22:06 UTC, Nordlöw wrote:
> Destroy, please!
As a quick comment, your definition of "moveFront" is not what
phobos understands with "moveFront":
Namelly, the idea of moveFront, is simply that it takes the front
and std.algorithm.move's it.
If anything, I'd have expected you to provide something returns
the popped element. What you do pops an element, and then returns
the *next* one. What good is that?
Also, what you want to check is "hasSlicing", which is more
powerful than "isRA". Speaking of which, if you don't have
"isRA", it looks like your range errors out (no "front").
Your sliding splitter does not handle narrow strings. I'd have
thought that was the original goal. Well, it is better to not
support it at all of course, rather than doing it wrong :)
More information about the Digitalmars-d-learn