faster splitter

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon May 23 08:03:52 PDT 2016


On 05/23/2016 10:25 AM, Jack Stouffer wrote:
> On Monday, 23 May 2016 at 14:17:59 UTC, Andrei Alexandrescu wrote:
>> What would be the condition tested in the static if?
>
> I would assume `static if (isBidirectionalRange!Range)`
>
>> Recall that sometimes you do want a forward range even when you could
>> define a bidirectional range. -- Andrei
>
> I honestly can't think of a time when would this be the case. What are
> you losing by having back and popBack defined?

You might be doing extra work even if the user never calls back and 
popBack. -- Andrei


More information about the Digitalmars-d mailing list