Notes from C++ static analysis

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Jun 26 20:05:20 PDT 2013


On Thursday, 27 June 2013 at 02:40:53 UTC, Andrei Alexandrescu 
wrote:
> You are wrong.

format has thrown exceptions with such code since v2.000 (that's 
the year 2007). It's only in v2.061 that it has finally gotten an 
informative error message in the exception it throws.

> Forcing D's writef to match exactly the format string against 
> the number of arguments passed is a waste of flexibility and 
> caters to programmers who can't bring themselves to unittest or 
> even look at the program output - not even once.

If you are the type of programmer who often tests their own code, 
why are you passing more arguments than needed to format?


More information about the Digitalmars-d mailing list