On Tuesday, 28 October 2014 at 23:06:32 UTC, Manu via Digitalmars-d wrote:
I haven't thought of one I'm really happy with.
I can imagine some 'foolproof' solution at the API level which may accept some sort of growable string object (which may represent a stack allocation by default). This could lead to a virtual call if the buffer needs to grow, but that's not really any worse than a delegate call, and it's only in the rare case of overflow, rather than many
calls in all cases.

If you want to combine two approaches of writing data, you will need to write toString logic twice, both variants intertwined on every byte written.

Reply via email to