String Interpolation

duckchess duckchess at chess.com
Sat Oct 21 20:58:44 UTC 2023


On Saturday, 21 October 2023 at 18:25:22 UTC, Adam D Ruppe wrote:
> On Saturday, 21 October 2023 at 15:59:06 UTC, duckchess wrote:
>> can we just lower ```___""``` into ```mixin(___!"")```, where 
>> ```___``` can be any template name. this way you can implement 
>> whatever interpolation method you want in a library.
>
> https://github.com/adamdruppe/interpolation-examples/blob/master/01-basics.d
>
> I'll add more examples to that repo as I have time, but this 
> implementation allows libraries to do whatever methods they 
> want.

here's a better example of what i suggest:

https://run.dlang.io/is/n121Ph


More information about the Digitalmars-d mailing list