On Friday, 25 September 2015 at 14:38:33 UTC, Nick Sabalausky wrote:
I like that idea. It it feasible? I'd always assumed the syntaxes were different because they needed to be for some sort of technical reason. But now that I look at it...maybe that could work after all?

At first glance I can't see any problem with it, other than the fact that it makes it somewhat ambiguous whether you're mixing in a string returned from a CTFE function or a template mixin in some cases.

mixin template mixable()
    int i = 0;

string mixable()()
    return "int i = 0;";

However, this currently causes a compile time error anyway, so I don't believe it's a problem.

//Error, two templates with the same name
mixin mixable!();

Reply via email to