What do you thing about this string interpolation idea
schveiguy at gmail.com
Mon Dec 10 18:44:48 UTC 2018
On 12/10/18 12:43 PM, Jonathan Marler wrote:
> It can also have some pretty unexpected results. For example, having a
> variable reference an outerscope instance instead of the local one:
Meh, I don't see this as really a problem or unexpected -- depending on
how you look at the feature.
In general, anyone who wants to use this technique would know to mixin
the string in the function they are going to use it.
I'm not saying the proposed DMD update and DIP isn't worth it, as even
with the better call syntax, this is going to tax the CTFE engine hard,
compared to what the compiler deals with (and that code already is
there). But it's worth exploring how far we can get with this idea, to
see the limitations and benefits. Maybe it solidifies the position that
we need it in the language instead of the library.
More information about the Digitalmars-d