News for hackers. Stuff that matters.
Re:Go proposal: Leave “if err != nil” alone? by amelius on Friday June 28, 2019 @03:52PM (#20308219)
The problem is that even if the programmer is forced to deal with every error condition, they might think a particular error is not likely and write a dummy handler (like print something and hope for the best). In that case exceptions are superior because at least they wind down the stack and allow a caller to deal with the situation, and prevent a crash.
Re:Go proposal: Leave “if err != nil” alone? by erik_seaberg on Friday June 28, 2019 @03:57PM (#20308259)
When people don't care, you have to make doing it right easier than doing it wrong.
Re:Go proposal: Leave “if err != nil” alone? by clinta on Saturday June 29, 2019 @12:41AM (#20310850)
Or at least force it to be an intentional decision to do it wrong, which go does. Exceptions permit the programmer to be unaware that the function they're calling could throw an exception.