It is an old feature. I've proposed to replace it like your snippet, but it was rejected, because of the breaking backward compatibility. Today we (at least I and Andrei) agree with adding new functions, but their names are still debatable.
See the discussion in here. https://github.com/D-Programming-Language/phobos/pull/231 We'll welcome your comments. Kenji Hara 2012年3月26日8:31 Martin Nowak <[email protected]>: > I'm a little tired of repeating this code snippets over and over again. > > string formatString(Args...)(string fmt, auto ref Args args) > { > import std.array, std.format; > auto app = appender!string(); > formattedWrite(app, fmt, args); > return app.data; > } > > What's the reason that std.string.format defaults to vararg formatting? > _______________________________________________ > phobos mailing list > [email protected] > http://lists.puremagic.com/mailman/listinfo/phobos _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
