phobos dependencies

Michel Fortin michel.fortin at michelf.ca
Fri Dec 20 11:40:22 PST 2013


On 2013-12-20 19:36:28 +0000, "Meta" <jared771 at gmail.com> said:

> On Friday, 20 December 2013 at 19:34:10 UTC, Patrick Down wrote:
>> On Friday, 20 December 2013 at 17:40:08 UTC, H. S. Teoh wrote:
>>> in the current import path, then implicitly try to import x.y and lookup
>>> z in that module. Then you could just write:
>>> 
>>> 	void f(T)(T t) if (std.range.isInputRange!T) ...
>>> 
>>> and the compiler will automatically import std.range within that scope.
>> 
>> How about:
>> 
>> scope import std.range;
>> // lazy import std.range; ?
>> 
>> void f(T)(T t) if (std.range.isInputRange!T) ...
> 
> I think the best keyword to use in this situation would be stati... Oh, 
> dammit, not again.

Actually, "static import" already exists. And semantically it's pretty 
much the same thing as the above: you have to use the symbol's full 
name. But currently the compiler will import eagerly. I doubt there'd 
be any breakage if "static" changed to mean "lazily imported".

-- 
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca



More information about the Digitalmars-d mailing list