Is it possible to "cache" results of compile-time executions between compiles?

TheFlyingFiddle via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 24 04:14:05 PST 2017


On Tuesday, 24 January 2017 at 11:19:58 UTC, TheFlyingFiddle 
wrote:
> Does D have any facilities that could make this possible?

It seems that there is a feature I was unaware of/forgot called 
Import Expressions.

unittest
{
    enum s = import("myfile");
}

Is there something similar to this for outputting files at 
compile-time? Or do I need to keep the source around and write it 
at run-time?


More information about the Digitalmars-d-learn mailing list