On 11/4/12 9:49 AM, deadalnix wrote:
You are explaining here that is reasonable to expect so, not that this
is the most obvious choice, the most simple, or whatever.
Agreed, it would be simpler to just create a new string for each line.
The conclusion exceed the argument here.
I'd also argue that if people that wrote phobos get that wrong (I think
it is fair to consider people writing phobos code as D specialists), it
is safe to assume that most D programmer will get it wrong.
Nah, actually what happened is that much phobos code has been written
while the concepts were in flux, so probably it would be hasty to draw
conclusions from there.
Requiring anything more would put undue pressure on any actual input
range implementations and would essentially make the entire range
infrastructure unusable efficiently with streaming.
This is already doomed to phobos implementation of range stuffs. That
may sound nice on paper, but practice have shown this isn't a realistic
approach.
Again, that would be a rushed conclusion to draw.
For ByLine we should add another range that automatically produces
strings - either ByLineStrings or ByLine!string.
If we are modifying things like that, better proposal have been made in
this thread and previous.
That's an addition, not a modification. Big difference.
Andrei