Re:Go proposal: Leave “if err != nil” alone?
by vbezhenar on Friday June 28, 2019 @02:47PM
(#20307607)
There's one problem with traditional exception model. Basically there's hidden untyped program flow behind the scenes. So it's like running wild JavaScript behind your strongly typed program, because you can never be sure what exceptions could be thrown from that function.
Java tried to tackle this problem, introducing at least optional typing with its checked exceptions but failed miserably.
That said, I don't think that exceptions are bad idea, they just have to be improved. Error handling via explicitly returning error is a step back.
[ Parent
| on HN ]
There are no comments on this comment yet.