3 ms·
Unused imports and variables being errors is pretty squarely counter to that philosophy. I don't think Go represents the "static typing, but lenient" philosoph
by pcwalton 11y ago
Unused imports and variables being errors is pretty squarely counter to that philosophy.
I don't think Go represents the "static typing, but lenient" philosophy particularly better than C#, for example, does. Go seems to focus on simple typing, not lenient typing. There's a big difference between the two.
- stcredzero 11y agoI never said Go was perfect. Go needs to have much better debugging for my tastes.
- earthboundkid 11y agoI am never bothered by unused variables when I'm doing exploratory programming in Go because if the variable is still unused, I haven't written enough code to get to the point of running it for testing. I used to be bothered by the import thing, but then I installed goimports, and now Go is actually better than other languages for imports. Just write "foo.Bar" in your code and goimports will automatically add "baz.io/foo/" to the imports section on save.