Scope of import

Adam D. Ruppe destructionator at gmail.com
Sat May 15 11:38:22 UTC 2021


On Saturday, 15 May 2021 at 07:15:51 UTC, DLearner wrote:
> rdmd main.d

rdmd sucks, it runs the compiler twice and get the list of 
imports and even then it might not see them all.

Just use

dmd -i main.d

instead. It will be about 2x faster and more reliable.

The downside differences though:

* rdmd runs the program too, dmd -i just compiles. You run the 
program separately.
* rdmd will cache the executable, dmd -i will always recompile. 
But since running the program is a separate step, you just run it 
yourself if you don't want to recompile, and run dmd if you do.



More information about the Digitalmars-d-learn mailing list