Hacker News new | ask | show | jobs
by pjmlp 641 days ago
Except for anything more production quality, one needs to lean on third party crates to compose errors without explicitly write tons of boilerplate composing result types.

Something that should be supported directly.

1 comments

I agree that it's not ideal, but using something like anyhow/l and thiserror honestly doesn't feel _that_ bad.

> Something that should be supported directly.

Rust has "adapted" some crates into stdlib in the past. Are there any efforts to that for error handling?

We're on the like, third (fourth?) generation of error handling crates, and while there's some degree of consensus happening, I'm not sure that it's time for it yet.

If Rust had adopted error_chain into the stdlib, that would have been a huge mistake.

So far only the related traits.

That is the kind of excuse we give in C and C++ land, using static analysis isn't that bad.