I apologize in advance for the rather meek review below; I did not have the time to be more thorough.
- What is your evaluation of the design?
The review discussions provided many insightful arguments in favour or against various aspects of the design, and I have not formed a final opinion about most of these. I do believe that fixing E for result<T> to error_code is the right decision. I would prefer a design without an empty state, because we already have a vocabulary type for it. The choice of C++14 seems motivated solely by performance considerations. A slower C++11 version should be considered.
- What is your evaluation of the implementation?
I did not have enough time to review it.
- What is your evaluation of the documentation?
The introduction (Description) only provides a vague description of the
purpose of the library. For example, it does not mention that its types
are used to carry either a value or an error. Instead, it assumes that
the reader can derive this from prior familiarity with expected<T> (or
Rust.)
The first motivating example is too large (as indeed are the examples
in the tutorial.) Instead I suggest a "Tony table" that shows the
essense of the library (either value or error.) For example:
Before:
FILE *file = fopen("myfile", "r");
if (!file)
throw std::system_error(errno, std::system_category(),
"Error delivered out-of-band by errno");
fclose(file);
After:
result
- What is your evaluation of the potential usefulness of the library?
The idea of an either-value-or-error return type is very useful.
- Do you think the library should be accepted as a Boost library?
No, not in its current form. I have two reasons for this rejection. First, some of the design discussions (especially on narrow/wide contracts) are not settled yet, so it would be premature to vote for the design. Second, whilst the lastest offer from the author about a fully-fledged Boost.Outcome repository without a dependency on the non-reviewed library called "boost-lite" is a step in the right direction, it is unclear to me how that repository will end up. Having been surprised by the current submission and the author's opinions, I will defer any vote of acceptance until the a repository is submitted for review.