3 ms·
I don't understand. What's being sacrificed? Of what use is a list of imports that aren't used?
by jameskilton 10y ago
I don't understand. What's being sacrificed? Of what use is a list of imports that aren't used?
- kormoc 10y agoEfficient copypasta
- fhood 10y agoYou have never commented out a section of code that was the only place an import was used for debugging?
- jameskilton 10y agoOf course I have. That's not a good reason for the compiler to allow the unused imports. The benefits of Go's strict compilation rules far outweigh the periodic pain points.
- imauld 10y agoSure. I also use Atom with gofmt installed (the Atom gofmt package allows you to use goimports as a formatter). Comment the line and hit save and the import goes away. Uncomment and hit save and it comes back. Tools exist to make dealing with this requirement painless.