Summary: [module] Flag unused imports to avoid unnecessary
           Product: D
           Version: future
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Leandro Lucarella <> 2009-11-13 17:06:47 
PST ---
Dependencies makes compile time increase in large projects and have other bad
impact in the code. An import might even execute code (module ctors), which can
make the program slower at *run-time* unnecessarily if the module is not really

I think unused import should trigger *at least* an optional warning (with -w or
something) to aid the programmer in detecting unused modules. A way to tell the
compiler that an unused module is OK should be provided (in case we need the
module ctor to run), a possible syntax is a special renamed import:

import void =;

A special selective import can do the job too:

import void;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to