On Saturday, 24 December 2016 at 20:32:58 UTC, Andrei Alexandrescu wrote:
Consider:

with (import std.stdio)
int fun(int x/*, File f*/)
{
    // f.writeln("In: ", x);
    return x * x;
}

Such situations occur during refactorings and code evolution. The import is no longer used. Should the compiler flag that as an error, or leave it be?


Andrei

Generic code and generated code would suffer from an error being generated there.

Reply via email to