4 ms·
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 tha
by nvarsj 6y ago
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.
- kstenerud 6y agoThis. 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. https://github.com/kstenerud/go#the-go-programming-language https://github.com/kstenerud/go#the-go-programming-language
- nvarsj 6y agoThat'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.
- furstenheim 6y agoHow 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.