News for hackers. Stuff that matters.
Re:Why I love Go by pjmlp on Wednesday December 06, 2017 @02:08AM (#15859166)
That is a fallacy because I have seen Go code with _ everywhere , thus not handling errors at all.
Re:Why I love Go by zaarn on Wednesday December 06, 2017 @03:24AM (#15859508)
Most linters that concern themselves with errors will complain about this and I would not accept any code that does this beyond tests.

Go allows you to do certain things but it's not a fallacy because it's something that's allowed but not necessarily tolerated by what most consider "good Go coding standards"

Re:Why I love Go by pjmlp on Wednesday December 06, 2017 @04:34AM (#15859789)
My consulting experience has shown that beyond startups, or a few Fortune 500 companies like Google and FB, linters and code reviews are seldom done, unless we are speaking about safety critical domains like aeronautics, autos, train control systems,medical devices....
Re:Why I love Go by zaarn on Wednesday December 06, 2017 @04:44AM (#15859828)
So because a lot of people don't use best practises that means the language in which these are to be used is worse off?

It strikes me a bit like saying "because most people don't wear seatbelts, cars are unsafe because you may get ejected out of the cockpit in a crash". Wear a seatbelt and use linters, I'm not going to excuse the malpractices of the larger industry.

Re:Why I love Go by pjmlp on Wednesday December 06, 2017 @05:34AM (#15860036)
No, it follows junke answer.

Optional external tools, are exactly that, optional.

Lint was created for C in 1979, a minority used it or its commercial versions like Gimpel, until clang was introduced with static analysis built into the compiler.

Anything that isn't enforced by the language, tends to be ignored, hence why we need good defaults that make workarounds a big pain.

Re:Why I love Go by junke on Wednesday December 06, 2017 @05:08AM (#15859927)
That means that you better have safe defaults in a language, rather that opt-in linters.
Re:Why I love Go by zaarn on Wednesday December 06, 2017 @05:16AM (#15859964)
More safe defaults also means I have to think more about escape hatches. Sometimes ignoring an error is the intended way of operation, although rare. Same goes for some other parts of the go coding standards. Sometimes you need to violate them and having to first use some escape hatch like Rust's unsafe is annoying.

I'd rather just keep track of linter complaints.

Re:Why I love Go by junke on Wednesday December 06, 2017 @06:13AM (#15860221)
Yes, ignoring an exception is an explicit move when the default mechanism is to abort execution. Since it is rare, I don't see a problem.

> I'd rather just keep track of linter complaints.

Do you dislike "unused variables" being compilation errors, too?

Re:Why I love Go by zaarn on Wednesday December 06, 2017 @06:43AM (#15860365)
Not really. It has changed my coding style so I now only add variables when needed, even in languages like JS. I only get the "unused variable" error about once a month.