On 01/02/2012 11:07 PM, Nick Sabalausky wrote:
"Timon Gehr"<timon.g...@gmx.ch> wrote in message
news:jdlbpq$2b7e$1...@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.