Boost logo

Boost :

Subject: Re: [boost] [gsoc-2013] Boost.Expected
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-04-29 02:11:06


Le 28/04/13 23:28, Rob Stewart a écrit :
> On Apr 28, 2013, at 2:17 PM, "Pierre T." <ptalbot_at_[hidden]> wrote:
>
>> On 04/28/2013 07:30 PM, Vicente J. Botet Escriba wrote:
>>>>> Yes this is quite similar if we had exceptions and we had a try/catch block
>>>>>
>>>>> f0().then(f1).then(f2).then(f3).visit_error(error_visitor);
>>>>>
>>>>> try {
>>>>> f3(f2(f1(f0())));
>>>>> } catch(...) {
>>>>> error_visitor();
>>>>> }
> When the chain gets long, try blocks make increasing sense.
Agreed.
>
>>>>> It would be great if we could have the equivalent for
>>>>> try {
>>>>> h(f(), g());
>>>>> } catch(...) {
>>>>> error_visitor();
>>>>> }
>>>>>
>>>>> when_all(f(), g()).then(h).visit_error(error_visitor);
> "if_all" seems better than "when_all".
>
+1.

Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk