String Interpolation
Walter Bright
newshound2 at digitalmars.com
Mon Oct 23 01:13:10 UTC 2023
On 10/22/2023 4:32 AM, Arafel wrote:
> At which point it's barely an improvement overs what we can already do:
>
> ```
> int var = 67; auto s = mixin(i!"whatever $var");
> ```
>
> I'm not saving even one keypress, and readability isn't that much better either.
If you can make `i` work as a template, why not? I encourage you to give it a
try and write the template!
I've already worked out the logic for this:
https://github.com/dlang/dmd/pull/15722/files#diff-a556a8e6917dd4042f541bdb19673f96940149ec3d416b0156af4d0e4cc5e4bdR14291
Feel free to turn it into a template, and let's see.
More information about the Digitalmars-d
mailing list