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

Rusts error handling is almost identical to checked exceptions in practice. The reason it works is because there is no real equivalent to easily handle-able unchecked exceptions, and because macros and sum types make it very easy to wrap a lower level error in your higher level error and rethrow.

Basically, checked exceptions could have worked, if they were the only type, and had better ergonomics of use, and a language culture that emphasized correctness more.

Checked exceptions were wrong for Java, but that does not mean they are wrong universally.



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

Search: