Boost logo

Boost :

Subject: Re: [boost] [optional] Safe optional
From: Nevin Liber (nevin_at_[hidden])
Date: 2014-11-19 18:40:20

On 19 November 2014 16:32, Vicente J. Botet Escriba <
vicente.botet_at_[hidden]> wrote:

> Le 19/11/14 22:08, Nevin Liber a écrit :
> On 19 November 2014 13:42, Andrey Semashev <andrey.semashev_at_[hidden]>
>> wrote:
>> I think you're taking it too negatively.
>> Perhaps. Maybe it's just the scars from trying to get optional into
>> C++14.
>> Whenever expected or variant gets discussed in committee, the question of
>> "Do we still need optional?" gets raised. The answer in favor of optional
>> is yes because it has a much better interface. If the interface is in
>> flux, well, that argument isn't very compelling.
>> While I will continue to vote strongly in favor of adding optional to
>> C++17, I might not participate in the battles to help make that happen,
>> since I am far more interested in forward progress than churn for churn's
>> sake. But that is just me.
> I don't master English, what do you mean by "churn for churn's sake "?

Change for the sake of change, vs. change to make something better.

Andrzej has stated that he believes the current interface is better than
the new one, so this change isn't for the sake of making a better interface.

optional was accepted into Boost over a decade ago, so this change isn't to
gain consensus amongst Boost reviewers. Could a second version of optional
could pass an independent review, as opposed to the library maintainer just
adding it? (Note: I am not disputing that he can just add it if he wants;
that is his right.)

std::experimental::optional was accepted into Library Fundamentals; there
was consensus amongst committee members for the current interface.

> I believe that all of us think that it is better to have the current
> std::experimental::optional in C++17 than not having it at all.

But that is not a done deal. I would really like to be able to spell it as

Did the committee recommend that the author provide alternatives to the
interface in std::experimental::optional? AFAIK, no (but I was not present
in the room for all the various discussions).

Does having a second optional type in Boost by the person who proposed
optional to the committee help or hinder the chances of consensus being
reached for moving std::experimental::optional into C++17? He has already
stated in this thread that he is doing so partially for others to present
an alternative to the committee, if they should so choose.

I see three scenarios:

(1) Having two different interfaces reduces consensus, possibly to the
point of having various different optionals remain in std::experimental

(2) The new interface is ignored.

(3) The new interface is so horrible that it increases consensus putting
optional in C++17.

IMO, (1) is the far more likely scenario.

> You seam to state that experimenting with other interfaces goes against
> this primary goal. I just hope you are not right, but who knows ...

The committee is unpredictable; much of it depends on who is in the room
when it gets discussed.

Just my opinion, I don't speak for the committee, etc., etc.
 Nevin :-)

 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

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