All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Error Handling in Large Systems: The Debate Around Rust's .unwrap() Method

By

thundergolfer

6mo ago· 4 min readenInsight

Summary

The article discusses the debate around error handling in large systems, sparked by Cloudflare's November 18 outage postmortem that mentioned a single line of Rust code: '.unwrap()'. The author explains that in Rust, 'unwrap()' either returns a successful result or crashes the program, similar to an assert statement. The piece argues that most discussions about whether asserts are good in production miss the point, suggesting that the real issue is about having more options and choices in error handling strategies rather than prescribing one-size-fits-all solutions.

Key quotes

· 5 pulled
Cloudflare's deep postmortem for their November 18 outage triggered a ton of online chatter about error handling, caused by a single line in the postmortem: .unwrap()
If you're not familiar with Rust, you need to know about Result, a kind of struct that can contain either a successful result, or an error. unwrap says basically 'return the successful results if there is one, otherwise crash the program'
You can think of it like an assert.
There's a ton of debate about whether asserts are good in production, but most are missing the point.
More options means more choices.
Snippet from the RSS feed
More options means more choices.

You might also wanna read