Tricky semantics of ranges & potentially numerous Phobos bugs
monarch_dodra
monarchdodra at gmail.com
Thu Oct 18 00:46:05 PDT 2012
On Wednesday, 17 October 2012 at 19:56:08 UTC, Jonathan M Davis
wrote:
> [SNIP]
> I'm increasingly convinced that input ranges which are not
> forward ranges are
> useless for pretty much anything other than foreach.
> [SNIP]
> - Jonathan M Davis
That's already a pretty big usage :) The thing is you just can't
"do" anything with them, but that *is* the design.
Just read them once to place them into another container. The
fact they interface with, say "array", or "appender", or copy,
makes the interface convenient.
The fact that byLine will choke on a call to "array", IMO, has
nothing to do with it being a forward range.
More information about the Digitalmars-d
mailing list