Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyhow and Eyre seem cool, but completely losing all information about what types of Errors the function returns in favor if what is essentially a trait object of std::error::Error seems... questionable to me. I value type safety a lot.


I would say the same thing, but really it depends. Sometimes it really doesn’t matter what type of error it was, since all errors lead to the same outcome (print a simple error message and exit). Sometimes you just don’t know what kind of errors you’ll be dealing with, usually because it’s early in the design of the program and you haven’t explored the design space yet. In cases like these, crates like anyhow make perfect sense. It lets you put off making any complicated decisions about error types until you need to and are ready to.


I like them when errors are just information bubbling up.

When they're actionable I prefer actual types.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: