News for hackers. Stuff that matters.
Re:Async Rust: Panics vs. Cancellation by berkes on Monday January 31, 2022 @05:45AM (#30146638)
> assuming the system will work (reads/writes/sends)

I encounter these issues quite commonly. Permissions, being in the wrong dir, buggy setup that forgot to create directories or copy files etc.

Isn't the `read()` and `send()` in rust concerned with those less-exceptional exceptions as well?

Re:Async Rust: Panics vs. Cancellation by noitpmeder on Monday January 31, 2022 @05:50AM (#30146663)
I totally get these issues, and one definitely should be aware of them when designing a system. It just feels a bit weird to treat these as the points where exceptions emerge and not the parsing of input data.

Could totally be an artifact of the example that was chosen to prove a point, it's just what jumped out at me.

Re:Async Rust: Panics vs. Cancellation by unrealhoang on Monday January 31, 2022 @10:00AM (#30148592)
Usually in Rust, parsing would never cause panic (or your parsing library is very wrong), parser will just return error for unparsable input.
Re:Async Rust: Panics vs. Cancellation by berkes on Tuesday February 01, 2022 @06:43AM (#30161283)
> It just feels a bit weird to treat these as the points where exceptions emerge and not the parsing of input data.

I understand this. It does make sense when seen as an artifact of the educational nature, though.

If the article wanted to explain about exceptions in the parser, the author had to explain the domain as well. Whereas we all are familiar with the exceptions in the file-io-domain already.