phobos dependencies
Kenji Hara
k.hara.pg at gmail.com
Sun Jan 5 20:44:45 PST 2014
2014/1/6 Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>
> On 1/5/14 5:22 PM, Martin Nowak wrote:
>
>> On 12/20/2013 09:43 PM, Martin Nowak wrote:
>>
>>>
>>> Couldn't static imports be made lazy without breaking any code?
>>> The above example would read.
>>>
>>> static import std.range.
>>>
>>> void foo(R)(R range) if (std.range.isForwardRange!R)
>>> {
>>> }
>>>
>>
>> Furthermore selective import can always be made lazily without changing
>> code.
>>
>> import std.algorithm : min;
>>
>> Only if `min` or `std.algorithm` are used the compiler needs to open
>> std.algorithm.
>>
>
> I thought more about this and I think that's wrong. Making all imports
> lazy would be a net large win.
>
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.
Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140106/8ea4e8b4/attachment.html>
More information about the Digitalmars-d
mailing list