[dmd-beta] std.format scheduled changes

Alex Rønne Petersen xtzgzorex at gmail.com
Wed Aug 1 15:26:35 PDT 2012


On Thu, Aug 2, 2012 at 12:13 AM, David Nadlinger <code at klickverbot.at> wrote:
> On Wed, Aug 1, 2012 at 11:54 PM, Andrej Mitrovic
> <andrej.mitrovich at gmail.com> wrote:
>> Other than that are there any other scheduled changes to format's
>> behavior? It says format will eventually use xformat, but I don't
>> really know how format is different than xformat right now.
>
> xformat is a template, in contrast to format being a plain variadic
> function. This, and the format string issue mentioned in the
> changelog.
>
> Other than that, there might be subtle differences because the
> underlying formatting code changed (now the same as e.g. for
> writefln). For example, I'd expect (without actually having tested it)
> that %s for xformat will »pretty-print« enum members instead of just
> printing the raw integer values, because the type information is now
> available as a template parameter.
>
> David

I can confirm this. It is in fact exactly why I want the templated version...

Regards,
Alex


More information about the dmd-beta mailing list