> > Notably, if a package is included but not used, Go treats this as an error and enforces removing unused declarations A good illustration that the Go designers didn't think their ideas through. This is a real pain in the butt when you are writing code and regularly commenting in and out sections of code while you are testing things. And every time you do this, you need to remove or restore the imports. And since G…
Please don't misconstrue disagreement as sloppiness. If you read the mailing list, it's pretty clear they thought it through.
> This is a real pain in the butt when you are writing code and regularly commenting in and out sections of code while you are testing things.
Not for me. I love it, actually.
> And since Go's tooling is nonexistent, there is no IDE to do this automatically for you.
Vim does this for me.
Also, Go has some of the most wonderful tools of any programming language I've ever used.
> This kind of thing belongs in a compiler plug-in (if it was designed with such a thing in mind, which is not the case for Go), macros (if the languages supports them, ideally the hygienic and statically typed kind) or an external tool, not in the compiler.
I think reasonable people can disagree on this point.