phobos dependencies

Kenji Hara k.hara.pg at gmail.com
Sun Jan 5 22:04:22 PST 2014


2014/1/6 Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>

> On 1/5/14 8:44 PM, Kenji Hara wrote:
>
>> Honestly, "lazy import" (== defer loading module file and running
>> semantic analysis for symbol search) would improve compilation speed for
>> selective imports and static imports, but it would have no merit for
>> basic imports.
>>
>> So precisely, "all imports lazy would be a net large win." is not correct.
>>
>
> Consider:
>
> import std.stdio;
> void main() { writeln("Hello, world!"); }
>
> Currently std.stdio and all modules transitively imported by it would be
> opened.
>
> With lazy imports, std.stdio gets opened and then writeln() gets
> semantically analyzed. Only modules required by writeln() itself will
> actually be opened. Big difference.


Thanks for explanation. Indeed it would be big difference.

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140106/6cfa0825/attachment.html>


More information about the Digitalmars-d mailing list