Just another example of missing string interpolation

Andrea Fontana nospam at example.org
Wed Oct 18 22:43:56 UTC 2023


On Tuesday, 17 October 2023 at 20:05:59 UTC, Walter Bright wrote:
> On 10/17/2023 12:20 PM, Adam D Ruppe wrote:
>> And read the post above, which uses *write*, not write*f*. 
>> Think about the implications of that for a second.
>
> Yes, it means I forgot to use writef instead of write.

The DIP linked by Adam is very appealing to me. All the modern 
programming languages I frequently use have some form of string 
interpolation, and when I write code in D, I miss it. I genuinely 
don't understand the opposition to such a highly desired feature 
that can only enhance code readability.

I am less fond of the proposal related to 
printf/writef/writelnf/format/sformat, etc. It appears to add 
complexity to the code, introduces unnecessary noise, and is 
prone to errors.

Andrea


More information about the Digitalmars-d mailing list