On 2/2/14, Andrei Alexandrescu <[email protected]> wrote: > On 2/1/14, 3:07 PM, Andrej Mitrovic wrote: >> byLine -> safe, doesn't reuse a buffer >> byLineBuffer -> reuses a buffer > > No. Too much breakage.
No, I meant before the function was even introduced. But for future new APIs we could be more careful. byLine resulting in "strange results" is one of the most asked about things in IRC and the DForums, here's a short list of threads I could find in a quick search: std.array.array broken? http://forum.dlang.org/thread/[email protected]#post-ouyuujnzzvfkvxbfzyak:40forum.dlang.org Reading file by line, weird result http://forum.dlang.org/thread/[email protected] csvReader byLine http://forum.dlang.org/thread/[email protected]#post-mailman.1713.1340376472.24740.digitalmars-d:40puremagic.com persistent byLine http://forum.dlang.org/thread/[email protected] array(file.byLine()) is a problem http://forum.dlang.org/thread/[email protected]%2Fissues%2F std.stdio.ByLine is not true input range http://forum.dlang.org/thread/[email protected]%2Fissues%2F Read Complete File to Array of Lines http://forum.dlang.org/thread/[email protected]#post-mefabsmxvzwahzdlkvnp:40forum.dlang.org File.byLine should return dups? http://forum.dlang.org/thread/[email protected] Safer stdin.byLine() http://forum.dlang.org/thread/[email protected]/issues/
