Details of the inline import idiom

TheGag96 thegag96 at gmail.com
Fri Sep 27 03:37:53 UTC 2019


I was looking back at the inline import idiom article[1]. One of 
the purported benefits of doing something like 
from!"std.datetime".SysTime was that doing so wouldn't go and 
import the entirety of the module into the namespace and slow 
down compile time / bloat the binary. But how is this so? When 
the template ends up doing import from = std.datetime, doesn't 
that go and import everything, not just SysTime? Or is there some 
detail I'm missing? Thanks!

[1]: https://dlang.org/blog/2017/02/13/a-new-import-idiom/


More information about the Digitalmars-d-learn mailing list