Compile / runtime differences for using import statements

Ali Çehreli acehreli at yahoo.com
Sat Apr 22 16:15:08 UTC 2023


On 4/20/23 17:15, Adam D Ruppe wrote:
 >> importing a
 >> function/component from a module as stand-alone or importing the whole
 >> thing makes any difference.
 >
 > There's no difference at link or runtime.
 >
 > The only difference is how the name works. The selective imports work as
 > if you wrote:
 >
 > static import std.stdio;
 > alias writeln = std.stdio.writeln;

I remember comparisons where selective imports reduced compilation 
times. Is that not true?

Ali



More information about the Digitalmars-d mailing list