News for hackers. Stuff that matters.
Re:Go’ing Insane: Endless Error Handling by zarzavat on Tuesday September 14, 2021 @09:42AM (#28524667)
The older I get, the cleaner I want my code to be. Reading code is the best way to prevent bugs. If the code is strewn with error handling ceremony then it's hard to get to the essence of what the code is doing, and it makes it more likely that bugs will go unnoticed.
Re:Go’ing Insane: Endless Error Handling by vlunkr on Tuesday September 14, 2021 @09:55AM (#28524841)
Personally I think Go code is incredibly clean, even with the error handling. It's just little if err != Nil statements that you essentially speed-read. And is knowing what errors are possible in your code not an important part of reading it? Why should that be obscured?
Re:Go’ing Insane: Endless Error Handling by iainmerrick on Wednesday September 15, 2021 @03:41AM (#28536358)
That’s why checked exceptions are good!
Re:Go’ing Insane: Endless Error Handling by JyB on Tuesday September 14, 2021 @06:08PM (#28532130)
That's funny when Go's main focus is readability at the cost of writability. That's one of its main tenets...

Some HN comments toward Go are a bit baffling.

Re:Go’ing Insane: Endless Error Handling by azth on Wednesday September 15, 2021 @04:47PM (#28544165)
I find golang much harder to read due to its extreme verbosity that detracts away from the logic the code is trying to do.