DIP 1027---String Interpolation---Format Assessment

Walter Bright newshound2 at digitalmars.com
Wed Feb 26 09:45:55 UTC 2020


On 2/25/2020 1:36 AM, aliak wrote:
> This may have already been answered in the other threads, but I was just 
> wondering if anyone managed to propose a way to avoid this scenario with DIP1027?
> 
> void f(string s, int i = 0);
> f(i"hello $a"); // silent unwanted bahviour.
> 
> ?

It is lowered to:

   f("hello %s", a);

as designed. I don't know what's unwanted about it.


More information about the Digitalmars-d-announce mailing list