DIP 1027--String Interpolation--Final Review Discussion Thread

Johannes Loher johannes.loher at fg4f.de
Thu Feb 6 07:43:38 UTC 2020


Am 05.02.20 um 23:30 schrieb Adam D. Ruppe:
> I'm not convinced that assigning to a string variable will actually be
> the most common usage though. You're surely creating this string to do
> something... and the variable doesn't actually do anything. You're
> surely going to pass it to a function eventually.. and often sooner
> rather than later.

A use case which I already had a few times already is templated strings
for mixins.

I also just noticed that for this particular case, there is another
problem. Usually for such strings, I would use the q{} syntax. As far as
I understand, the current proposal does not allow mixing those 2. Is
that correct? What would the syntax be anyways if we allow mixing those
2? iq{}?

Not being able to mix them would be very sad because this is the main
use case where I have wished for string interpolation in the past.


More information about the Digitalmars-d mailing list