IMHO it should be IDE's job. When coding Java or C#, you select "Fix imports" and IDE automatically removes unused imports and adds new imports for undefined symbols. By the way, what about syntax like this: import std.*; would it make sense?