News for hackers. Stuff that matters.
Re:Python 3.11: “Zero cost” exception handling by Zababa on Wednesday October 06, 2021 @03:31PM (#28777276)
> Modern languages like Go and Rust separate the error handling from the conventional logic, and that makes the code more readable.

The (result, error) pattern in Go or Result<Ok(res), Err(error)> pattern in Rust usually mixes the two. Unless you're doing and_then in Rust, but Go doesn't have anything like that. If anything, I feel like it's exceptions that separate the error handling for the conventional logic. You have your normal code in try, and your error handling in except.

There are no comments on this comment yet.