www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11951] New: formattedWrite should take OutputRange should be ref parameter


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

--- Comment #0 from Tobias Pankrath <tobias 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

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: -------
Jan 19 2014