String Interpolation

duckchess duckchess at chess.com
Mon Oct 30 15:19:01 UTC 2023


On Monday, 30 October 2023 at 14:50:42 UTC, IGotD- wrote:
> On Monday, 30 October 2023 at 13:25:17 UTC, duckchess wrote:
>>
>> the problem only exist if we call them interpolated _strings_. 
>> just don't to that, it will avoid endless confusion. call them 
>> interpolation tuples in the language. or whatever. just avoid 
>> calling them _string_ at all costs.
>
> They are likely to be some other type under the hood in other 
> languages as well, yet they called interpolated strings. Now, I 
> suggest that go to the forums of all the languages that has 
> interpolated strings and instruct them to stop using that term.

but they act or convert to string. which has it's own set of 
problems.
so either D gets 'string interpolation' that acts like a string 
too,
or D doesn't get 'string interpolation' but a completely 
different feature 'interpolation tuples' or however you wanna 
call it, that doesn't suggest to the user that the result is a 
string. you can still explicitly convert the result to a string 
in case you need that.
it's about not confusing the users.

and no, there's no need for other languages to change, as they 
have string interpolation. they don't have what the proposals for 
D are.


More information about the Digitalmars-d mailing list