Just another example of missing string interpolation

Imperatorn johan_forsberg_86 at hotmail.com
Sat Oct 14 15:57:21 UTC 2023


On Saturday, 14 October 2023 at 14:47:26 UTC, Andrey Zherikov 
wrote:
> On Saturday, 14 October 2023 at 06:25:15 UTC, Imperatorn wrote:
>> On Friday, 13 October 2023 at 18:24:08 UTC, Adam D Ruppe wrote:
>>> On Friday, 13 October 2023 at 17:31:29 UTC, bachmeier wrote:
>>>> I don't know, but I also don't know why I would want to, 
>>>> because DIP 1027 was not accepted.
>>>
>>> dip 1027 was utter trash, but there's future good dips that 
>>> would easily solve these things. pity D's leadership is so 
>>> clueless and obstinate.
>>
>> We just want to be able to do
>>
>> string s = "Hello {name}, you are {age} years old and have 
>> {money - 42} dollars in the bank";
>>
>> Is it too much to ask? 😭
>
> Why does not this work for you?
> ```d
> string s = text("Hello ",name,", you are ",age," years old and 
> have ",money - 42," dollars in the bank");
> ```

It's ok, but just nicer to do it as in C#


More information about the Digitalmars-d mailing list