What do you thing about this string interpolation idea

Steven Schveighoffer schveiguy at gmail.com
Mon Dec 10 15:50:58 UTC 2018

On 12/10/18 7:45 AM, FeepingCreature wrote:
> On Monday, 10 December 2018 at 12:34:33 UTC, Daniel Kozak wrote:
>> https://gist.github.com/run-dlang/a0dce06b873b216680df673661e4b4e6
> While I'm not sure of all the details of the implementation, I think the 
> use of a mixed in templated nested function to enable access to the 
> local scope without string mixin is inspired. Very clever idea.

Yeah, this looks a lot better than mixing in every interpolation.

I tried it out with adding arbitrary expressions, and it works like a 
charm: https://gist.github.com/run-dlang/6f682fe6ca12e02acc1c6af2c67632e7

It needs some polish around the parsing (need to handle parentheses and 
separating symbols with something other than space), but I'm pretty 
happy with the concept.


More information about the Digitalmars-d mailing list