|
Boost : |
Subject: Re: [boost] compact_optional -- prompting interest
From: work (Vladimir.Batov_at_[hidden])
Date: 2015-09-26 18:46:19
> Nevin Liber wrote:
>> Andrzej Krzemienski wrote:
>> I am not particularly tied to name compact_optional.
>
> I'm strongly against the word "optional" appearing the name,
> ...
> At best, it resembles optional only superficially...
So very true. Carving magic values out of the actual type has always (to
me) been a hack. That's what IMO boost::optional addresses perfectly.
Now I am somewhat uncomfortable that Andrzej is taking that route of
providing and legitimizing the hack which instead needs to be replaced
with boost::optional.
I might have not read the whole thread to the last letter but benefits
of that pseudo-optional are still questionable to me. The only one that
stood out for me was performance but I am far from convinced that
boost::optional introduces any noticeable run-time penalty. I suspect in
an application where boost::optional does introduce performance issues
there'll be many more serious bottlenecks and restrictions to consider.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk