7 ms·
How about adding a flag to the bloody compiler to allow me to compile my code with unused bits? I refuse to touch Go until that happens. Go is the asshole of p
by GreaterFool 11y ago
How about adding a flag to the bloody compiler to allow me to compile my code with unused bits?
I refuse to touch Go until that happens. Go is the asshole of programming languages. It forces you to put code in deeply nested annoying directories
vim foo.go
vim ../../../github.com/blahblah/moreblahblah/blah.go
sigh
But that I could live with. But constantly commenting the code out (which of course leads to commenting out even more code!) is the real PITA.
All said and done it looks like a useful, if uninspired, language. Can avoid it so may as well use it. But this nonsense has to stop!
- nvader 11y agoYou can use the _ signifier to mark imports as optional during development: use import _ "net" Make sure you don't check such lines of code in to your repo, because there is a concrete benefit to having the language enforce this import strictness. But the person who would check in code with unused _ imports, would probably abuse a hypothetical "allow unused imports" flag in production. Go is probably not for that person.
- millstone 11y agoMost Go developers just use goimports. So really this "unused import" warning is a "you forgot to push the magic fix-it button." (Why didn't it push it for me?) Or more to the point, if Go can figure out imports, why require them to be explicit at all?