Subject: Re: [boost] [outcome] where is the monadic style tutorial?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2017-06-01 11:53:28
Ok so the approach is to do
auto expected1 = do_statement1();
if (!expected1) return expected1;
auto expected1_value = expected1.value();
auto expected2 = do_statement2(expected1_value);
if (!expected2) return expected2;
auto expected2_value = expected2.value();
with that logic being encoded by the TRY macros?
I'd rather use continuation passing style, was that considered?
>> (auto const& expected1_value)
>> (auto const& expected2_value)
On 1 June 2017 at 10:44, Andrzej Krzemienski via Boost <
> 2017-06-01 11:12 GMT+02:00 Mathias Gaunard via Boost <
> > Hi,
> > I just took a quick look at outcome today and I don't really understand
> > what it is doing.
> > I expected to have some kind of mechanism to manage control flow with
> > propagation between states only happening if the previous expression in
> > chain resulted in an expected value, like with the Expected monad.
> > I searched throughout the documentation and didn't find any.
> > Why is there no example of this? More than how the error state is
> > and stored or how to capture custom errors, I believe the programming
> > is what the tutorial should really focus on.
> It has been agreed upon that the tutorial needs to undergo a rewrite.
> Meanwhile, maybe the following examples can help:
> Unsubscribe & other changes: http://lists.boost.org/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk