www.digitalmars.com         C & C++   DMDScript  

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

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 puremagic.com
        ReportedBy: tobias pankrath.net
                CC: zan77137 nifty.com, schveiguy yahoo.com,
                    cbkbbejeap mailinator.com, johannespfau gmail.com
        Depends on: 9102



PST ---
formattedWrite should take its output range parameter by ref.



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