D's treatment of values versus side-effect free nullary functions

Justin Johansson no at spam.com
Tue Jul 20 14:28:16 PDT 2010


Jonathan M Davis wrote:
> Also, the 
> function could be used in CTFE to produce the value at compile time and just use 
> that value instead of calling the function at runtime. Depending on how the 
> function is used and how much optimizing the compiler does, the function may 
> never get called at runtime.

Thanks again.
This bit of insight into CTFE was particularly useful to me. :-)


More information about the Digitalmars-d mailing list