|
Boost : |
Subject: Re: [boost] [optional] Safe optional
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-11-18 04:28:09
2014-11-18 8:16 GMT+01:00 Matt Calabrese <rivorus_at_[hidden]>:
> On Mon, Nov 17, 2014 at 10:59 PM, Vicente J. Botet Escriba <
> vicente.botet_at_[hidden]> wrote:
>
> >
> >> I will ad that I believe Dr BS don't like dynamic visitation, but here
> > we are doing pattern matching on types, isn't it?
>
>
> For a while I assumed exactly that, but he actually specifically voiced
> that he does not like visitation on variant and thinks of it as a hack.
> It's sad :/
>
>
> > @Matt I don't think we need to choose instead of the user. We have here
> > two complementary interface to the same data, there is no one better than
> > the other. Up to the user to choose the one more adapted to his needs.
>
>
> I'm still not really sure I agree. I see no problem with things like
> Boost.MSM and Boost.Statechart both being in Boost, as while they solve
> many of the same problems they each have very clear advantages and
> disadvantages. I'm actually very much in favor of stuff like that.
>
> On the other hand, safe_optional and optional would basically be two
> templates that have identical implementation with just different
> interfaces. If you can say objective things about one being safer, and all
> else is equal, then it should be THE library and the old optional should be
> deprecated. I don't think it's worth having two libraries when they are so
> similar.
>
This is something more than that.
They have the same implementation but two different conceptual models with
different trade-offs between performance, expressibility and UB-avoidance.
>
>
> --
> -Matt Calabrese
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk