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

Adam D. Ruppe destructionator at gmail.com
Thu Feb 4 15:34:07 UTC 2021

On Thursday, 4 February 2021 at 15:29:47 UTC, Ola Fosheim Grøstad 
> You know that the opening brace is interpolating, so then you 
> know what the closing one is.

but you don't know that the opening brace is interpolating.

enum name = "foo";
mixin(iq{ void {name}() {bar} });

Is {bar} interpolation or a function body?

With ${} there's no question.

mixin(iq{ void ${name}() {bar} });

name is interpolated, bar is a body.

More information about the Digitalmars-d mailing list