How about Go's... error on unused imports?

Nick Sabalausky a at a.a
Thu Nov 12 20:20:54 PST 2009


"Phil Deets" <pjdeets2 at gmail.com> wrote in message 
news:op.u3bfg4rz1py94j at desktop.neo.rr.com...
> 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 
> n  -analyze switch that preformed extra checks with static code analysis, 
> this could be one of those checks.
>

At the risk of sounding like a broken record (do people outside the DJ scene 
still know what those are?), that's what warnings are [supposed to] be. 





More information about the Digitalmars-d mailing list