[Issue 4458] Static typing for format strings, when possible

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 28 08:28:56 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=4458


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #4 from Don <clugdbug at yahoo.com.au> 2011-02-28 08:26:05 PST ---
Note that because of typesafe varags, this is a *much* smaller problem for D,
than it is for C or C++. Your test case generates a run-time exception. In C,
it silently fails, and it can be quite difficult to realize that the reason the
printed results are different to what you expected, is because there was an
error in the format string.

Personally I've wasted an enormous amount of time on this bug in C++ (and when
I use printf in D), but I've never had any problems with writefln or format.
I think it's a printf-specific bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list