by codeflo · 6y ago · 0 comments
But that's basically giving up on informative library-specific error types. It may a valid solution, but it is quite a big leap.
Another tack may be to have the functionality of thiserror in the standard library, to make it less of a hassle to define errors.
Technically the stdlib could probably define
Result<T, E=Box<dyn Error>>
That way there wouldn't strictly be any loss, you'd just get a more convenient "application-level" Result OOTB.I don't know if that would be incompatible with the existing though.
The prelude lives in and uses std, and I don't see people who want exceptions using no_std anyway.