3 ms·
The nice thing about a statically typed language having standard golint and gofmt is that code is generally self documenting. So I wouldn't ever type that funct
by wybiral 7y ago
The nice thing about a statically typed language having standard golint and gofmt is that code is generally self documenting. So I wouldn't ever type that function call without seeing the function definition (in my editor or wherever else I found the API reference).
But I agree, the fact that Go allows this is bad, imo. It would be better if you had to explicitly suppress errors, even with something like this "_ = doThing()" just to make it harder to miss.
- apta 7y ago> So I wouldn't ever type that function call without seeing the function definition (in my editor or wherever else I found the API reference). How often do you handle or explicitly ignore the error returned by fmt.Print? This is just proof that golang error handling is error prone.