protocol for using InputRanges
Walter Bright
newshound2 at digitalmars.com
Thu Mar 27 14:06:35 PDT 2014
On 3/27/2014 5:45 AM, "Ola Fosheim Grøstad"
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Thursday, 27 March 2014 at 12:35:04 UTC, Steven Schveighoffer wrote:
>> I think we should work on making a protocol that does not require awkward
>> calls, rather than alienating developers who don't follow the awkward protocol.
>
> This is it.
Sure, but what is awkward about empty-front-popFront?
You can still always use:
foreach (e; range) { ... }
which will follow the correct protocol automatically.
More information about the Digitalmars-d
mailing list