July 20, 2020
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.
July 20, 2020
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.