Nick Sabalausky wrote: > ... I for one really want something like that. I think I posted a suggestion like this as well: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=95579
This also came up in another thread and was warmly received, in the context of using the syntax on sql queries: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=102085 I like your syntax too. Mostly I just want to see this happen somehow. I also realized such syntax allows us to do this: int foo = 42; string bar = "answer"; writefln("The $bar is $foo."); // Prints "The answer is 42." I'd love to be able to do that. I'd settle for writefln#("The $bar is $foo."); as well if we really need to be able to grep mixin usage. The # could be any token of our choosing. This all still leaves the problem of parentheses matching. Parentheses make a terrible nesting element. mixin Foo! (` someDslCodeHere `); // Yes, don't forget the terribly asymmetrical semicolon. versus mixin Foo!() { // Valid D tokens only, and {} must be matched. someDslCodeHere } I think the latter is worth investing in as well.
