The state of string interpolation

o o at o.o
Fri Dec 7 21:13:24 UTC 2018


On Friday, 7 December 2018 at 20:59:51 UTC, H. S. Teoh wrote:
> I see.  So that means what we really want is for the language 
> to translate interpolated strings into tuples that can then be 
> processed by library code. In other words, it's not really an 
> interpolated string anymore, it's a kind of "tuple literal" 
> with convenient syntax. It has general applicability, and can 
> be used for all sorts of interesting things beyond just 
> interpolated strings.  Like your database query example.  In 
> fact, it can even form the basis for implementing my named 
> parameters idea.  Once we have it in tuple form, it can be used 
> for all sorts of things.  (Which makes me wonder if we can even 
> make it a replacement for std.meta.AliasSeq ...) It would be an 
> enabler of cool new D idioms, rather than mere syntactic sugar 
> for a "niche" use case.
>
> T

This is phrased **perfectly**. Would you mind adding it to the 
DIP 
(https://github.com/jash11/DIPs/blob/master/Drafts/1NNN-JSH.md)? 
It would be a great addition. Thanks so much!


More information about the Digitalmars-d mailing list