www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1919] New: StringWriter docs are completely unclear

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1919

           Summary: StringWriter docs are completely unclear
           Product: D
           Version: unspecified
          Platform: PC

                    StringWriter
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jlquinn optonline.net


The docs for StringWriter are as follows:

struct StringWriter(Char);
    Implements the static Writer interface for a string. Instantiate it with
the character type, e.g. StringWriter!(char), StringWriter!(wchar), or
StringWriter!(dchar). Regardless of instantiation, StringWriter supports all
character widths; it only is the most efficient at accepting the character type
it was instantiated with.

This explanation generates a bunch of naive questions:

* What's the Writer interface (and don't make me search to find it)?
* What do I do with this struct?
* How does it accept chars?
* What does it do with the chars?


-- 
Mar 12 2008
next sibling parent reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1919


andrei metalanguage.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bugzilla digitalmars.com    |andrei metalanguage.com





Phobos does not have a streaming interface yet. I intended StringWriter as an
intermediate solution for the new implementation of writef*. When Phobos will
adopt a full-fledged streaming solution, StringWriter will be absorbed into it.
For now, please consider StringWriter undocumented and not for general use. (I
had to make it public due to a compiler bug.)


-- 
Mar 12 2008
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
d-bugmail puremagic.com wrote:
 http://d.puremagic.com/issues/show_bug.cgi?id=1919
 
 
 andrei metalanguage.com changed:
 

 Phobos does not have a streaming interface yet. 
Isn't that what std.stream is supposed to be? --bb
Mar 13 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1919







 Phobos does not have a streaming interface yet. I intended StringWriter as an
 intermediate solution for the new implementation of writef*. When Phobos will
 adopt a full-fledged streaming solution, StringWriter will be absorbed into it.
 For now, please consider StringWriter undocumented and not for general use. (I
 had to make it public due to a compiler bug.)
OK. Please consider adding the above text to the StringWriter doc for now, so that people aren't left wondering what it is. --
Mar 13 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1919


Andrei Alexandrescu <andrei metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





06:29:23 PDT ---
StringWriter has been replaced with std.array.Appender.

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