Discussion Thread: DIP 1036--Formatted String Tuple Literals--Community Review Round 1

James Blachly james.blachly at gmail.com
Wed Sep 9 23:04:37 UTC 2020


On 9/9/20 5:41 PM, Paul Backus wrote:
> Adding dedicated overloads of writefln, idup, etc. to deal with 
> interpolated strings might sound like a good solution, but it doesn't 
> scale. The *best-case* scenario is that DIP 1036 creates a bunch of 
> meaningless busywork for library maintainers; the more realistic 
> scenario is that most libraries never get updated at all, and users have 
> to either check every individual function they use for 
> interpolated-string compatibility, or defensively spam .idup everywhere 
> (at which point, you might as well just make interpolated strings use 
> the GC to start with).

This (and the related points about complexity and surprise especially of 
new users made by Paul but also by myself and others) make me tend to 
believe that we should just add GC-only, implicit automatic conversion 
to Dstring, and be done with it.

Are there contemporary examples of other languages whose string 
interpolation is as complex as this proposals? I am really only most 
familiar with Javascript and Python, both of which use automatic memory 
management and the *string is a string is a string*.

James


More information about the Digitalmars-d mailing list