4 ms·
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
by napsterbr 7y ago
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.
- tptacek 7y agoI 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.
- kstenerud 7y agoIf 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.