[Issue 8084] std.stdio.ByLine is not true input range
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 12 09:54:25 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8084
--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> 2012-05-12 09:55:49 PDT ---
(In reply to comment #1)
> In order for byLine to be efficient, it must reuse the buffer it's reading. In
> order for the above code to be equivlent, it must dup every line, which is
> hugely inefficient if you aren't going to use them beyond the scope of the
> foreach statement.
OK. ByLine.front returns the slice of internal line buffer, so it specifies
'temporary' data. We should get dup in each iteration.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list