Boost logo

Boost :

Subject: Re: [boost] [review] Review of Outcome v2 (Fri-19-Jan to Sun-28-Jan, 2018)
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2018-01-28 00:13:30

> I was only talking about semantics. Are you saying that, except for
> performance considerations, there is no reason to use
> OUTCOME_TRY(handle, open_file(path));
> OUTCOME_TRY(buffer, read_data(handle));
> OUTCOME_TRY(val, parse(buffer));
> return val;
> instead of
> return parse(read_data(open_file(path)));

It is rare that functions would consume an Outcome as a parameter. After
all Outcome is not Expected, and Default Actions get a throw site away
from the cause of the error.

But in the end, there is nothing stopping you using Outcome as if
Expected, and there is a `checked<T, E>` typedef in there just for those
wanting a logic error checking Monad like Expected.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at