2 ms·
Every time someone mentions this fact I think about Zig having recently added this "feature" and my blood boils. Unused imports or variables being errors is th
by sph 4y ago
Every time someone mentions this fact I think about Zig having recently added this "feature" and my blood boils.
Unused imports or variables being errors is the most idiotic and overrated paper cut ever implemented in compilers. In no universe it is a good idea.
I posit there are actually no or very few bugs it catches, and in exchange it ruins people's iterative development, flow and hyperfocus states when experimenting, because poor compiler can't deal with an unused import, fix it now or else. Now we need an IDE setup to deal with this? And why the hell isn't this a feature that can be turned off?
If only I could throw the person that invented this crap into the flaming sun.
- tptacek 4y agoIt has caught some bugs for me, and I essentially never think about it anymore, because `goimports` just handles this. It is substantially easier for me to deal with imports in a Go program than in a Python program, and if I look back at my old code, I wince at all the pointless crap at the top of my programs.