Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ensuring error values get all the way to the top-level error handling loop is generally more ergonomic with exceptions, not less. It's easier for values to fall by the wayside, and for errors not to propagate when they're paired (type-wise) with values.

If you do a lot of error handling close to the point of the error condition being found, the Rust / checked exceptions approach works well. For the kinds of applications that are written in Java, it's not the case. Most error conditions need to be propagated and the action in flight aborted.



> Most error conditions need to be propagated and the action in flight aborted.

That's exactly what the '?' operator does. It's just as ergonomic as Java exceptions, and it doesn't hide the places where errors can be returned and the execution flow can be diverted.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: