What do you thing about this string interpolation idea

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Dec 10 18:48:37 UTC 2018


On Mon, Dec 10, 2018 at 01:44:48PM -0500, Steven Schveighoffer via Digitalmars-d wrote:
> 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.
[...]

Yes, pushing the limits of the current language will give us more solid
arguments to convince W&A that language support is necessary.  Otherwise
there's a risk they will consider library solutions "good enough".


T

-- 
People tell me that I'm skeptical, but I don't believe them.


More information about the Digitalmars-d mailing list