On 13 August 2017 at 12:07, Stefan Koch via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
On Sunday, 13 August 2017 at 00:42:08 UTC, Manu wrote:
On 13 August 2017 at 00:15, Stefan Koch via Digitalmars-d <
[ ... ]

If you're keen to introduce a new function, I'd strongly suggest changing to {1} {2} {3}, or %1 %2 %3, format/printf functions where you don't supply the place index are useless a lot of the time and need to be rewritten, which is a tedious task.

I am not too keen introducing a new function, given that it most likely won't be accepted into phobos.

However your suggestion is indeed a good suggestion.
The check would then see if the number of args are equal to the max index.
And it would check that all indices from 0 to maxIdx are used at least once.

No, it's not always the case that a format string uses every argument. Format strings are usually taken from the translation table. Different languages have different word orders (which is why placeholders need to accept an arg index), and occasionally, some translations don't use all the args because the sentence structure doesn't make sense, or excess args are supplied because one language requires a string that others don't use.