On 6/27/13, Andrej Mitrovic <[email protected]> wrote: > On 6/27/13, Andrei Alexandrescu <[email protected]> wrote: >> NO! This is exactly the kind of code that is buggy and useless. The >> right use cases involve more arguments than format specifiers. > > I mistyped that, I meant: > > format("%s", 1, 2); // no exceptions in future release > safeFormat("%s", 1, 2); // exception thrown
I'll add that the exception throwing was not introduced v2.000 (because my test-case was wrong), but was introduced in 2.062: std.format.FormatException@C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\string.d(2346): Orphan format arguments: args[1..2] I'd like to keep this behavior in either a new separate format function or as a customization point of format.
