Adam D. Ruppe: > bearophile wrote: > > Currently this is not caught by D, it prints "12": > > import std.stdio; > > void main() { > > writefln("%d%d", 1, 2, 3); > > } > > That's not really an error. You might change out the format > string at runtime based on user preferences, perhaps for > internationalization, or other reasons.
Right, the format string is in general a run-time value, so you can't always catch this situation at compile-time. But how many times do you want to ignore some of the arguments listed? Even if this happens (and I don't remember needing this), I think it's not common enough to justify so permissive semantics at run-time. Recently Andrei A. has expressed some opinions on this topic, but I don't remember the bug report number. Bye, bearophile