Warn on unused imports?

Basile B. b2.temp at gmx.com
Tue Feb 2 08:35:40 UTC 2021


On Sunday, 31 January 2021 at 19:18:04 UTC, a11e99z wrote:
> suggestion: implicit import at same line as using
>
> auto result = std.algorithm:find!blahblah(args);

We have that, remember

---
template from(string moduleName)
{
   mixin("import from = " ~ moduleName ~ ";");
}

void main()
{
     from!"std.stdio".writeln("check 
https://dlang.org/blog/2017/02/13/a-new-import-idiom/");
}
---


More information about the Digitalmars-d mailing list