News for hackers. Stuff that matters.
Re:Go compiler internals: Adding a new statement to Go by tptacek on Friday July 05, 2019 @03:32PM (#20365170)
I used to want that too, but I've paid pretty close attention over the last couple years and that error has caught a nonzero number of what would otherwise have been runtime bugs.
Re:Go compiler internals: Adding a new statement to Go by napsterbr on Friday July 05, 2019 @03:53PM (#20365330)
For production I agree 100% with you, to the point I think it's just sloppy to leave unused variables and imports hanging around.

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.

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.