Re:Go is boring, and that’s fantastic
by nvarsj on Thursday July 02, 2020 @11:05AM
(#23713996)
Also, ironically, go doesn't even do this - it fails compilation on the most useless and pedantic of errors - unused variables and imports. Despite the fact that it's common practice to comment out sections of code during development and debugging, which inevitably leads to unused variables/imports.
[ Parent
| on HN ]
This.
So damn annoying and stupid that I finally broke down and modified the compiler to add a -warnunused flag so I don't have to suffer.
That's not a bad idea - I may go the same route.
I like go for a lot of reasons. But these idiosyncrasies really drag the language down at times.
Re:Go is boring, and that’s fantastic
by furstenheim on Thursday July 02, 2020 @06:01PM
(#23718593)
How ironic, one of the first things that I missed in Java was that. Nor the compiler error, nor the standard linter (checkstyle) prevents unused variables.