Subject: Re: [boost] [gsoc-2013] Boost.Expected
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-04-29 02:18:23
Le 28/04/13 22:24, Pierre T. a écrit :
> On 04/28/2013 09:31 PM, Vicente J. Botet Escriba wrote:
>> Le 28/04/13 20:17, Pierre T. a écrit :
>>> I forgot to claim the change but in my "then" version, the function
>>> passed to "then" must return an expected (or void). So all functions
>>> are expected producers. It's strange to return something else because
>>> it would always be a good value into an expected. The "then" chaining
>>> could not return error cases.
>>> I don't think there are much differences between when_all and
>> There are some :)
>> * when_all() is a free function, expected::then is a member function.
>> * when_all() takes expected as parameters, while then() takes
>> continuations having as parameter the expected value.
>> They have in common that the result could be an expected<tuple>.
> IMHO, a member method is better because it can be chained any where in
> the chain. I also prefer the method taking continuations as it enables
> void return function.
I suspect that you have not understood the differences. Each function
provides a different service, they are not concurrent, we don't need to
choose one or the other, both are useful.
The single thing we can do is to give it a priority on the plan.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk