July 20, 2020 Is there a compiler option to list all functions executed at compile time when compiling a file? | ||||
---|---|---|---|---|
| ||||
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 Re: Is there a compiler option to list all functions executed at compile time when compiling a file? | ||||
---|---|---|---|---|
| ||||
Posted in reply to blizzard | 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.
|
Copyright © 1999-2021 by the D Language Foundation