[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Using Result instead of Option in libraries

On Monday 17 October 2016 at 21:40, Ashish Agarwal wrote:
> True, these are even more precise, but the types are getting even more hairy 
> now. Are there good combinators that help you anymore, or do we end up doing 
> a lot of explicit match cases.

As I said, monadic join.
> I agree that good error handling is critical and library writers should 
> strive to make it possible. I might even go further and say the binary 
> Ok/Error separation is superficial. Whether we call something an error or 
> not, or whether it is a cornerstone or merely important, the issue is we 
> don't have a good way of writing code where every function might return a 
> different set of variant constructors, and you want to handle a subset of 
> them to varying degrees.

I think we should avoid framing this in too much generality. In practice actual 
error handling occurs locally and if not is quickly transformed and propagated 
to more generic error data types to the top level or to a logging point.


MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.