Discussion Thread: DIP 1036--String Interpolation Tuple Literals--Community Review Round 2
Paul Backus
snarwin at gmail.com
Fri Jan 29 15:49:14 UTC 2021
On Friday, 29 January 2021 at 15:28:21 UTC, Steven Schveighoffer
wrote:
>
> The intent is for the compiler to identify the exact location
> of interp.
>
> This doesn't necessarily mean lowering, it means that only the
> druntime interp template will be used (which is easy to do
> internally).
Once the `interp` instance passes through the implicit .stringof
in mixin(...), all of that semantic information is lost. Most of
the time you will get lucky and it will work anyway, but you have
no guarantee.
Adam knows all about the pitfalls of mixin + stringof, so feel
free to ask him about it if you still don't understand.
> There will be no overriding of interp or idup allowed in user
> code. I could have sworn I had a statement in the DIP that said
> that, but I may have deleted it in the many rewrites.
Unless you make `interp` and `idup` reserved identifiers (which
is a breaking language change), there is no way you can prevent
this in the general case.
More information about the Digitalmars-d
mailing list