toString refactor in druntime

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 27 14:04:55 PDT 2014


On 10/27/14 4:24 PM, ketmar via Digitalmars-d wrote:
> On Mon, 27 Oct 2014 15:20:24 -0400
> Steven Schveighoffer via Digitalmars-d <digitalmars-d at puremagic.com>
> wrote:
>
>> Might I suggest a helper that takes a sink and a variadic list of
>> strings, and outputs those strings to the sink in order.
> hehe. simple CTFE writef seems to be a perfect fit for druntime. i
> implemented very "barebone", yet powerful PoC in ~18Kb of code (~500
> lines). it can be made even smaller if necessary. then one can use
> something like `writef!"<%s:%5s>"(sink, msg, code);` and so on.
>

I think this is overkill for this purpose. We need something simple to 
save a few lines of code.

-Steve


More information about the Digitalmars-d mailing list