DIP 1027---String Interpolation---Community Review Round 1

aliak something at something.com
Thu Dec 12 16:50:47 UTC 2019


On Thursday, 12 December 2019 at 16:46:06 UTC, H. S. Teoh wrote:
> On Thu, Dec 12, 2019 at 03:41:54PM +0000, aliak via 
> Digitalmars-d wrote:
>> On Thursday, 12 December 2019 at 13:36:38 UTC, Adam D. Ruppe 
>> wrote:
>> > BTW the JS one is actually quite interesting. It calls a 
>> > user-defined function, passing the arguments - similar to 
>> > the D tuple thing.
>> 
>> Except you can actually assign it to a string?
> [...]
>
> As Adam already said, you can assign it to a string if the 
> return type has alias this to string.
>
>
> T

So i"blah %var" would not return a tuple but a type that has 
alias this to string? Like:

struct interolation_type {
   alias ?? this;
}


More information about the Digitalmars-d mailing list