www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is there a compiler option to list all functions executed at compile

reply blizzard <bliz zar.d> writes:
I am trying to learn D and knowing when code is run at compile 
time would be good for learning what functions can be used 
without thinking much about performance.
Jul 20 2020
parent Adam D. Ruppe <destructionator gmail.com> writes:
On Monday, 20 July 2020 at 16:01:53 UTC, blizzard wrote:
 I am trying to learn D and knowing when code is run at compile 
 time would be good for learning what functions can be used 
 without thinking much about performance.
No function is ever run at compile time unless you specifically request it with some kind of static context, like top-level in a module or class declaration, putting the static keyword on the variable, passing it to a !() template argument, or using the enum keyword.
Jul 20 2020