Boost logo

Boost :

Subject: Re: [boost] [outcome v2] How important is it that an Expected implementation is also provided?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-10-04 16:46:23


> Just to clarify your question. Outcome v2 will provide a number of ways
> for the user to customize the interface: different templates, hooks,
> ability to derive from base templates and modify behavior. Correct?

Customise the interface, no.

Customise certain interoperation points, yes. Like when an outcome<T,
EC, E> gets constructed into a result<T, EC>, you can specify how that
should be per-namespace.

> You are considering shipping Outcome v2 with one such customized type
> that resembles Expected as close as possible in order to:
> 1. Demonstrate that this is possible
> 2. Because many people will want to use a type they have learned from
> reading proposals for Expected.

It's already shipping an Expected implementation, but in its test suite
purely so I can reuse Vicente's Expected test suite.

Perhaps the FAQ entry might help?
https://ned14.github.io/outcome/faq/#how-far-away-from-the-proposed-std-expected-t-e-is-outcome-s-checked-t-e

But to answer your question, for v1 Outcome lots of people wanted an
Expected implementation, not anything Outcome is doing. But v2 Outcome
is much closer to Expected than before, and moreover the Expected
proposal itself moved much closer to Outcome thanks to the Outcome v1
review. See
https://github.com/viboes/std-make/blob/master/doc/proposal/expected/d0323r3.md
for just how much closer.

I was just wondering how important an Expected implementation remains
for people. Outcome v2's `unchecked<T, E>` and `checked<T, E>` are
awfully close to Expected, as the draft WG21 paper comparing Outcome and
Expected shows
(https://groups.google.com/a/isocpp.org/d/msg/std-proposals/ynDjm5t1U_k/oYtlp_2PAgAJ).
Is it desirable that Outcome makes an Expected implementation a first
tier type, or better to leave it to an FAQ entry like at present?

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/

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