front stability

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 30 07:17:22 PDT 2016


On 6/2/16 8:51 AM, Steven Schveighoffer wrote:
> I have always treated ranges with this expectation:
>
> 1. front gets you the current element of the range. Calling front
> multiple times without calling popFront should get you the same value.
> 2. popFront moves you to the next element of the range if it exists.

Jack Stouffer has created a PR to formalize this.

Please comment if you have objections (the group that argued for current 
generate behavior was absent from this post that was meant to be a 
debate). I think this is the right thing to do.

https://github.com/dlang/phobos/pull/4511

-Steve


More information about the Digitalmars-d mailing list