On Wednesday, 14 December 2016 at 22:56:54 UTC, Andrei Alexandrescu wrote:

The acceptability of the proposal decays exponentially with its deviation from existing import syntax. -- Andrei

sorry, i missed the import keyword :/

T1 fun(T1, T2)(T1 t1, T2 t2)
import
{
     version(A)
     { import someMod: T1, T2; }
     else
     { import someOtherMod: T1, T2;}

     import std.stdio;

// this import block would support only import statemens, version and static if etc...

}
{
     t2.writeln;  // use symbols imported by the import block
     T1 ret = t1 + t2;
     return ret;
}

Reply via email to