Hacker News new | ask | show | jobs
by Zababa 1721 days ago
> 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.