DIP 1027--String Interpolation--Final Review Discussion Thread
Jonathan Marler
johnnymarler at gmail.com
Tue Feb 4 17:13:38 UTC 2020
On Tuesday, 4 February 2020 at 07:12:11 UTC, Walter Bright wrote:
> On 2/3/2020 5:06 PM, Jonathan Marler wrote:
>> Some applications want the "Strings and Expressions" form
>> rather than the "Format String" form.
>
> To have "strings and expressions" then write it that way:
>
> foo("I want ", i, " bananas");
I explained why I thought it would be better for interpolated
strings to resolve to "Strings and Expressions" rather than
"Format Strings". Then you responded saying you can write
"Strings and Expressions" without interpolated strings. However,
I'm not sure what the relevance is. You can also write "Format
Strings" without interpolated strings, like this:
foo("I want %s bananas", bananas);
But I'm not sure how these facts help us determine which form
interpolated strings should resolve to?
More information about the Digitalmars-d
mailing list