I want to clarify that I favor adding Result
only to address situations where manual propagation is necessary. Manual propagation will always occasionally be useful; adding async
/await
(or whatever we end up doing) will surely eliminate most of the most common situations, but they'll still exist, e.g. when using futures (which are the equivalent of manual propagation for async
/await
and accordingly trigger similar requirements).
I will continue to recommend against using Result
as an alternative mechanism for ordinary propagation of errors, although I have no doubt that some people will insist on doing so; and I continue to believe that using a different error type than Error
is generally misguided for the same reason it's generally misguided with ordinary error-handling. I also worry that the ergonomics of this type are significantly hurt by the attempt to support typed errors and (especially) non-Error
-conforming errors.
But as someone who's thought quite a bit about error propagation, especially with regards to async
/await
, I have no doubt that Result
will be a useful type even in that future.