D at shootout.alioth.debian.org

BLS windevguy at hotmail.de
Fri Jun 4 14:48:29 PDT 2010


On 04/06/2010 22:32, bearophile wrote:
> Andrei Alexandrescu:
>> http://www.reddit.com/r/programming/comments/cb14j/compiletime_function_execution_in_d/:
>
> Isn't the usage of "static" to run compile-time functions a bad practice? Time ago I have filed a bug about something related.
>
> Bye,
> bearophile

Have the same feeling. Question remains is > What instead?

/ctfe/ int r = fact(100);

Guess you know about Walter's allergic reactions regarding the 
introduction of a new keyword. :)

nevertheless IMHO a
compile {
   int r = fact(100): // would be smart
}

bjoern


More information about the Digitalmars-d mailing list