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

> Then they are completely misrepresenting what error handling is about

That's fine, but the commenter didn't pull this out of nowhere. It's in the article. Your reply makes it sound like you didn't read it, as if OP is giving a rare hypothetical that most Rust programmers don't support. This is common error handling advice in the Rust community.

And this is representative of what you may run into when reading other people's code or trying to contribute to their library.



I do not think you understood the conversation as I did.

Rusts error handling works by defining potential crashes with unwraps. A program never crashes unexpectedly there, as this is where you expect it to crash. The general pattern is fine and widely used, the other commenter did not understand that this kind of behavior results from unwrapping where you really do not want to unwrap.


> the other commenter did not understand [...]

That's not the case, I understand the issue at hand quite well. Please don't do this.

I didn't reply to your other comment because this conversation isn't/wasn't going anywhere.


Oh, I presumed you didn't because, even when I asked you, you didn't point out why you disliked it, what you would improve or how it compared to alternatives.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: