System programming in D (Was: The God Language)

Timon Gehr timon.gehr at gmx.ch
Mon Jan 2 14:19:19 PST 2012


On 01/02/2012 11:07 PM, Nick Sabalausky wrote:
> "Timon Gehr"<timon.gehr at gmx.ch>  wrote in message
> news:jdlbpq$2b7e$1 at digitalmars.com...
>>
>> What the template 'X' currently achieves is an improvement in syntax:
>>
>> string generated = "foo!\""~x~"\"(\""~bar(y)~"\")";
>>
>
> Ewww, who in the world uses double-quote strings for code containing quotes?
> That's not a fair comparison. This is a better comparison:
>
> string generated = `foo!"`~x~`"("`~bar(y)~`")`;
>
> vs
>
> string generated = mixin(X!q{
>     foo!"@(x)"("@(bar(y))")
> });
>
>
>

What if the code contains both " and `? Using `` strings for code that 
contains quotes is not a general solution.


More information about the Digitalmars-d mailing list