[Issue 11951] New: formattedWrite should take OutputRange should be ref parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 19 07:27:06 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11951

           Summary: formattedWrite should take OutputRange should be ref
                    parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: tobias at pankrath.net
                CC: zan77137 at nifty.com, schveiguy at yahoo.com,
                    cbkbbejeap at mailinator.com, johannespfau at gmail.com
        Depends on: 9102


--- Comment #0 from Tobias Pankrath <tobias at pankrath.net> 2014-01-19 07:27:04 PST ---
formattedWrite should take its output range parameter by ref.

See also: #10291 and #9102

Rational: To copy a range is only defined using .save for forward ranges and
makes no sense for output ranges in the general case and shouldn't be done
implicitly.

Writing output ranges with state (for example an indenter, that inserts tabs on
newline and forwards its input to another range) should not require an extra
indirection if written using a struct.

http://forum.dlang.org/thread/fmomscqpqitjbewracmo@forum.dlang.org#post-wbvdkmqsxrimuipufdix:40forum.dlang.org

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list