[Issue 10662] byLine!(Char, immutable Char) won't compile in git master
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 17 08:22:27 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10662
--- Comment #3 from monarchdodra at gmail.com 2013-07-17 08:22:26 PDT ---
(In reply to comment #2)
> I question whether or not this is a "rejects valid": byLine explicitly states
> buffer re-use, so requesting a `ByLine!(immutable Char)` simply is not
> possible.
>
> That said, I *would* see this as an enhancement, to have a line reader that
> always returns brand new buffers (in which case the line may or may not be
> immutable).
>
> EG: By ByDupLine ?
>
> Either that, or we simply keep using
> `byLine().map!"a.dup"`
> and
> `byLine().map!"a.idup"`
>
> That said, a `byDupLine` *is* a bit more user friendly, and helps limit levels
> of complexity in user code, as well as limits dependency on algorithm.
In defense of the "ByDupLine" argument, one *BIG* advantage it can provide is
that it can guarantee a single dup per front. `byLine().map!"a.dup`, on the
other hand will call dup on every call to front.
--
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