String interpolation, after a healthy debate on discord

bauss jj_1337 at live.dk
Thu Dec 16 14:20:21 UTC 2021


On Thursday, 16 December 2021 at 13:31:07 UTC, Adam D Ruppe wrote:
> 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.

And nobody will ever agree, so we just have to somehow stick with 
one implementation or it'll never happen.


More information about the Digitalmars-d mailing list