News for hackers. Stuff that matters.
Re:Ask HN: Why won't Go compile with unused imports? by fhood on Wednesday July 06, 2016 @02:51PM (#12045063)
You have never commented out a section of code that was the only place an import was used for debugging?
Re:Ask HN: Why won't Go compile with unused imports? by imauld on Wednesday July 06, 2016 @07:31PM (#12046573)
Sure. 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.
Re:Ask HN: Why won't Go compile with unused imports? by jameskilton on Wednesday July 06, 2016 @04:17PM (#12045598)
Of 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.