Warn on unused imports?

a11e99z black80 at bk.ru
Sun Jan 31 19:18:04 UTC 2021


suggestion: implicit import at same line as using

auto result = std.algorithm:find!blahblah(args);

1) its likes to/same as
import std.algorithm : find; with next using
but usuall it looks ugly:
{
   import one.stuff : some;
   import another.stuff : other;

   then goes some code;
   and then using here;
   so when u delete code - u left imports

2) u can use it for classes too
class Derived : some.module.B:Base { // no need import before

3) usually u import some entity for just one using so when u will 
delete this using u will delete unnecessary import too. no need 
separate line for it

easy to implement (imo), good looks as D-stuff, solves problem


More information about the Digitalmars-d mailing list