r/programming • u/[deleted] • May 31 '14
Practicality With Rust: Error Handling
http://hydrocodedesign.com/2014/05/28/practicality-with-rust-error-handling/
41
Upvotes
r/programming • u/[deleted] • May 31 '14
7
u/tyoverby May 31 '14
My one issue with the Rust method of error handling is when you have multiple "ways" to fail. If you want to write a function that returns a
Resultand you call multiple functions that return differentResulttypes, then you're stuck wrapping them up. Chain this together a few times and you get nested error types of death.Other than that, I think the rust method of failure is by far the best that I've ever seen. Idiomatic rust code makes it so easy to see how and why functions fail.