Re:Go compiler internals: Adding a new statement to Go
by tptacek on Friday July 05, 2019 @03:58PM
(#20365370)
I assume at this point that at least a plurality of Go developers are using goimports and having this stuff handled automatically. That's probably another reason my opinion on this shifted.
Re:Go compiler internals: Adding a new statement to Go
by kstenerud on Friday July 05, 2019 @11:19PM
(#20367577)
If IDEs did the same for unused variables, I'd probably shift as well, but right now, commenting out a line quickly degenerates into a game of whack a mole, because it causes a previous calculation to become "unused", and commenting out that line causes two more things to become unused, etc. The last thing I want during debugging is to have to fight the compiler at every step.
Debugging is the main reason I wrote this mod.
But during development that's just a needless obstacle. I may comment large blocks of code and I don't want to scan each import to make sure they are no longer used.