Compile time function execution...
Gregor Richards
Richards at codu.org
Thu Feb 15 11:36:54 PST 2007
I see that I can't do this:
char[] someCompileTimeFunction()
{
return "writefln(\"Wowza!\");";
}
int main()
{
mixin(someCompileTimeFunction());
return 0;
}
Any chance of compile-time code generation via this mechanism? Or are
they simply handled in different, incompatible steps of compilation?
- Gregor Richards
PS: Yes, I realize this is a terrible idea ^^
More information about the Digitalmars-d
mailing list