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

rikki cattermole rikki at cattermole.co.nz
Thu Feb 27 14:56:04 UTC 2020


On 28/02/2020 3:47 AM, SealabJaster wrote:
> Similarly, as far as I can tell even with the adjustment of making these 
> strings their own special type, something as simple (for other languages 
> as):
> 
> ```
> void f(string a, string b)
> { /*...*/ }
> 
> int foo = 20;
> string bar = "lalafell";
> f(i"You are a foo($foo)", i"I am not a $bar");
> ```
> 
> Isn't easily achieved without use of an extra helper function such as 
> i"...".format or .str, etc.

What you have suggested is a GC only language feature.

This will cut out numerous use cases for D, and will leave those people 
swearing and complaining.

Unlike new users who may not discover this feature for a while, existing 
users will complain and will not be happy guranteed.

This is something we as a community want to avoid.


More information about the Digitalmars-d-announce mailing list