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

Can you ELI 5?


Handle errors using exceptions (like most languages today, e.g. C++, Java, Python) vs errors as values (e.g. Rust, Go, Haskell).

The type system (especially for Rust and Haskell) forces you to always handle the error, or you have a compilation error. With some syntactic sugar (? in Rust, do notation in Haskell), you can be as concise as exception-based languages.


OK a lot of pieces just dropped in the place with your explanation. I’ve never heard it said so compactly before.




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

Search: