dsimcha <[email protected]> wrote:

If we make unused imports an error, how is anyone supposed to do import
someSmallLibrary.all? If you make unused imports an error, the collective cost of extra import declaration boilerplate will probably be larger than the GDP of some
African countries.

Only give warnings for this for modules specified on the command-line.
////
module foo;
import bar;
////
module bar;
import unused;
////

dmd foo
  No problem (as long as the compiler magically finds bar)
dmd foo bar
  Warning!


--
Simen

Reply via email to