Skip to content

Comment on Rust vs Go: A Hands-On Comparisonparent

Comments

Rust doesn't just forward the error, it forwards and converts the error. ? is effectively semantic sugar for:

`match result { Ok(v) => v, Err(e) => return e.into() }`

This means that the code related to error handling is all in one place, and your business logic can just focus on the happy path.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.