I really like Go overall, especially for systems work. But there's various quirks that hurt my day to day productivity, and I think they only exist due to stubbornness.
For example, why do unused variables and imports, a style issue, cause a compiler error? This is a constant pain if commenting out lines of code during debugging or prototyping. On the other hand, the compiler doesn't care if I ignore or forget to check error values - which is almost always incorrect behavior.
Re:A Proposal for Package Versioning in Go
by agnivade on Wednesday March 28, 2018 @02:32PM
(#16700423)
> For example, why do unused variables and imports, a style issue, cause a compiler error?
Here's why - https://golang.org/doc/faq#unused_variables_and_imports
Re:A Proposal for Package Versioning in Go
by shabbyrobe on Tuesday March 27, 2018 @07:30PM
(#16693773)
Yeah for sure, it's definitely got its warts. I suspect the import thing was far easier to code as an error than to compute whether they need to be pruned. Gotta love those go build times though! With vim-go and goimports, it's handled automatically for me on save so I don't find that an issue any more. Unused variables, on the other hand...
I think they threw out a bit too much, but that's only a problem if the gaps don't get filled or the compromises aren't adequately explained. What's left is a very pragmatic selection of extremely useful tools that can be used to cut a tonne of working code very, very quickly. I can't say I always like it, but I benefit tremendously from it.