String interpolation, after a healthy debate on discord

Adam D Ruppe destructionator at gmail.com
Thu Dec 16 13:31:07 UTC 2021


On Thursday, 16 December 2021 at 13:19:16 UTC, deadalnix wrote:
> So passing a raw a should work (it's an alias parameter).

yeah

> Which lead me to think, can't we generate some kind of struct 
> on the fly for the "${}" syntax?

I wrote about that back in 2019, indeed, at that point, it was my 
preference:
http://dpldocs.info/this-week-in-d/Blog.Posted_2019_05_13.html#my-string-interpolation-proposal

But it brings its own problems: this forces at least partial 
evaluation early which makes trouble with non-copyable types, 
breaks ref and aliases, and might be trouble tracking lifetime.

It is a solidly decent plan but not quite full D potential.

But like I've said before, all this stuff has been discussed to 
death. Some of us have been debating all this for years.


More information about the Digitalmars-d mailing list