Re: [DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-25 Thread Daniel Kozák via Digitalmars-d
Andrei Alexandrescu via Digitalmars-d napsal So, pro 24, 2016 v 9∶32 : 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

Re: [DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-25 Thread John Colvin via Digitalmars-d
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

Re: [DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-24 Thread ketmar via Digitalmars-d
On Saturday, 24 December 2016 at 20:32:58 UTC, Andrei Alexandrescu wrote: 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? please, no. "this is a work for a linter", as Walter likes to say

Re: [DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-24 Thread Jonathan M Davis via Digitalmars-d
On Saturday, December 24, 2016 15:32:58 Andrei Alexandrescu via Digitalmars- d 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

Re: [DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-24 Thread rikki cattermole via Digitalmars-d
On 25/12/2016 9:32 AM, 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

Re: [DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-24 Thread Tourist via Digitalmars-d
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

[DIP1005] Unused imports in with(import) declarations: leave alone of flag as errors?

2016-12-24 Thread Andrei Alexandrescu via Digitalmars-d
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