Boost logo

Boost :

Subject: Re: [boost] [variant2] Review of Variant2 started today : April 1 - April 10
From: Robert Ramey (ramey_at_[hidden])
Date: 2019-04-02 14:38:14

On 4/2/19 7:31 AM, Andrey Semashev via Boost wrote:
> On 4/2/19 4:18 PM, Peter Dimov via Boost wrote:
>> Andrey Semashev wrote:
>>> On 4/2/19 3:55 PM, Peter Dimov via Boost wrote:
>>> > Michael Caisse wrote:
>>> >
>>> >> Note: The repository contains an expected implementation also;
>>> however, >> that is not being considered in this review.
>>> >
>>> > To be clear, I do intend to finish `expected` and provide it as
>>> part of > the library.
>>> Will it be reviewed separately?
>> No. If you don't like it, now is the time to reject.
> In that case, `expected` should be part of this review and contribute to
> the final decision.
>>> Also, IMHO, it's better to have libraries more focused and fine
>>> grained. Why not have `expected` as a separate library?
>> expected<T, E...> is basically a variant, with a slightly different
>> interface.
> It might be implemented like/with variant, but conceptually this is a
> different component. Just like `optional` is a different component than
> `variant`. All these components have different use cases and communicate
> different intentions.

Personally, I've always found that characterizing option, expected, et.
all as different/unique components is a bad idea. I much prefer a
single simple idea - a variant as a simple sum of other types - while
the others are more specific "variations" of the fundamental type. It's
less redundant, easier to reason about, easier to remember, and less
work to document. There is also a natural C++ implementation in terms
of inheritance.

Robert Ramey
> _______________________________________________
> Unsubscribe & other changes:

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