News for hackers. Stuff that matters.
Re:Go Developer Survey 2022 Q2 Results by randomdata on Thursday September 08, 2022 @01:30PM (#32768799)
Go doesn't have errors, only values. Value handling could be improved, I'm sure, but anything that focuses on values that humans attach error meaning to is fundamentally flawed and will leave broken half-solutions.

Each problem people say Go has with error handling is actually a more general problem with value handling and/or interfaces and the right solution would solve for those problems across the board. The problems are real, but not related to errors specifically.

Re:Go Developer Survey 2022 Q2 Results by erik_seaberg on Thursday September 08, 2022 @03:41PM (#32770976)
There are always going to be cases where the happy path call tree should be abandoned because no useful value meeting requirements is going to be possible. What’s needed is to persuade Go devs to use panics instead of obscuring every function reinventing them by hand.
Re:Go Developer Survey 2022 Q2 Results by randomdata on Thursday September 08, 2022 @05:33PM (#32772384)
The happy path should at least have a value that we oft categorize as error to branch on meaningfully. If the code has no purpose it wouldn’t need to be called.

panic is certainly appropriate if programmer error left the application in an inconsistent state (an exceptional state, or exception for short as it is often referred to). I've never seen a Go developer, or developer in any other language for that matter, try to deal with these cases by hand.