Compile time function execution...
Witold Baryluk
baryluk at mpi.int.pl
Fri Feb 16 01:24:11 PST 2007
On Thu, 15 Feb 2007 11:36:54 -0800
Gregor Richards <Richards at codu.org> wrote:
> 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?
It seems to be bug.
>
> - Gregor Richards
>
> PS: Yes, I realize this is a terrible idea ^^
NO. It is the most exciting usage of this feature.
I was waiting for this a long time, and can't
wait for using in really cool things. :)
--
Witold Baryluk
MAIL: baryluk at smp.if.uj.edu.pl, baryluk at mpi.int.pl
JID: movax at jabber.autocom.pl
More information about the Digitalmars-d
mailing list