$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [review] Review of Outcome (starts Fri-19-May)
From: Peter Dimov (lists_at_[hidden])
Date: 2017-05-15 22:22:53
Niall Douglas wrote:
> Vicente, when he reviewed Outcome's docs, was pretty appalled at how error
> handling focused they are. His view is that Expected is an EITHER monad
> where E is exactly like T, and he was not happy that Outcome presents
> Expected as if it is solely for use for returning stuff from functions.
>
> And, he is right.
No, he isn't. The whole point of expected<> is that T is not like E. That's
why T is _expected_, and E is _unexpected_. It's in the name.
When T is like E, you use variant<T, E>. Or variant<E, T>.
My own idea of expected<T, E...> takes one T and an arbitrary amount of Es,
and while all Es are alike, T isn't.
And this aside, the general idea is to provide alternative to exceptions,
which kind of implies returning stuff from functions, does it not?