What do you thing about this string interpolation idea

Aliak something at something.com
Mon Dec 10 16:36:24 UTC 2018


On Monday, 10 December 2018 at 16:27:03 UTC, Steven Schveighoffer 
wrote:
> On 12/10/18 11:11 AM, aliak wrote:
>> This is much better than having to mixin everywhere. A couple 
>> of things:
>> 
>> 1) Can this be put in a module so that you don't have to 
>> mixin(enableInterpolation) but instead "import interp = 
>> std.interpolation;" or something similar?
>
> No, you need a local mixin. Doing that import just imports the 
> *symbol* into your namespace, but it doesn't give access to 
> your namespace to the symbol.
>

Au :(. Yeah that makes sense. Then I’m not sure I see how this 
improves things if it has to be mixed in to every scope you want 
to use interpolation for. The sparseness of interpolation might 
just make mixin(Interp!””)); more appealing.


More information about the Digitalmars-d mailing list