On 2013-12-20 19:36:28 +0000, "Meta" <[email protected]> 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
[email protected]
http://michelf.ca

Reply via email to