On 13 August 2017 at 00:15, Stefan Koch via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:

> On Saturday, 12 August 2017 at 13:19:12 UTC, ixid wrote:
>
>> On Saturday, 12 August 2017 at 11:47:10 UTC, Stefan Koch wrote:
>>
>>> Whereas the following alternative takes 20 ms :
>>> {
>>>     import ctfe_utils;
>>>     pragma(msg, format_jai("Hello % % % % % % % % %", " I ", " just", "
>>> have" , " to", " concat", " a lot", " of", " strings ...", 9));
>>> }
>>>
>>> see for yourself:
>>> https://www.youtube.com/watch?v=T0BJxdt61RY
>>>
>>
>> Could we not improve the syntax to something like:
>>
>>      pragma(msg, format_jai("Hello %9", " I ", "
>>  just", " have" , " to", " concat", " a lot", " of", " strings
>>  ..."));
>>  }
>>
>> Or whatever is closest that doesn't step on the current print syntax.
>>
>
> The point of format is that you want to replace the % my the argument and
> then write more static text.
>
> "The Parameter '%' was null and it should not be"
> "Rule '%' was not found in catalog '%' is possible the closest match"
>

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.

Reply via email to