How about Go's... error on unused imports?
Phil Deets
pjdeets2 at gmail.com
Thu Nov 12 20:16:06 PST 2009
On Thu, 12 Nov 2009 21:12:49 -0500, Leandro Lucarella <llucax at gmail.com>
wrote:
> I'm sorry to bring up another "How about Go's ..." topic, but I think
> this
> feature is very in sync with D and it should be really easy to implement.
>
> Go issues an error if you have an import that's never used, to avoid
> unnecessary dependencies.
>
> Do you see any reasons not to do that? I think it happens very often to
> stop using some import and never notice it.
>
I don't think this should be an error normally. Maybe if dmd got an
-analyze switch that preformed extra checks with static code analysis,
this could be one of those checks.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list