On 13 June 2014 14:14, Steven Schveighoffer via Digitalmars-d <[email protected]> wrote:
>> Some forward ranges don't have a known length, and can only be summed >> by an iteration sweep. > > > http://dlang.org/phobos/std_range.html#.walkLength That's inefficient, I might as well perform the iteration while I'm walking. No need for a whole pre-pass. Anyway, you don't need to show me how to work-around the issue. Of you think I'm not capable of figuring out workarounds myself, then I'm rather insulted. The point is, it's crappy, I see no real reason not to support foreach(; range) or foreach(range), it is already precedented by for(;;) (I was initially surprised by inconsistency, I'm sure I'm not alone). I was just throwing it out there as a thought.
