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.
[ Parent
| on HN ]
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!
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.