logoalt Hacker News

Ow My Foot – Error Handling Across C, Go, Rust, and Google's Absl

9 pointsby nlztoday at 3:18 PM3 commentsview on HN

Comments

joshsegalltoday at 3:26 PM

Great survey. One thing I'd push further on your principle 2.3: the reason .context() chains work better than stack traces isn't just ergonomics, it's that they preserve causal information rather than mechanical information. A stack trace tells you which functions were on the call stack. A context chain tells you what the program was trying to do. These are fundamentally different things, and the gap widens dramatically with async code, where the mechanical stack is often meaningless.

show 1 reply
nlztoday at 3:18 PM

Author here. I've been working with Rust more recently, and thinking through its error handling ecosystem led me down a rabbit hole comparing it to what I'd used before — C, Go, exceptions, and Google's Absl Status. The post ended up being a broader survey of error handling principles across languages and organizations than I originally planned. Looking forward to input — I'd love to hear what your experiences with error handling have been like, especially across different languages or at scale.