Discussion Thread: DIP 1036--String Interpolation Tuple Literals--Community Review Round 2

Paul Backus snarwin at gmail.com
Fri Jan 29 19:42:34 UTC 2021


On Friday, 29 January 2021 at 19:35:55 UTC, Steven Schveighoffer 
wrote:
> On 1/29/21 2:33 PM, Paul Backus wrote:
>> 
>> Ok, you got me, I forgot a `typeof`:
>> 
>>      anySatisfy!(isSomeString, typeof(i"I have ${count} 
>> apples"))
>
> Returns true.
>
> -Steve

Not the way the DIP is currently written. `typeof` can accept an 
expression tuple, and evaluates to a type tuple when it does; 
e.g.,

     static assert(is(typeof(AliasSeq!(1, 2.0, "hello")) == 
AliasSeq!(int, double, string)));


More information about the Digitalmars-d mailing list