Subject: Re: [boost] [outcome] To variant, or not to variant?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-06-02 10:29:18
On 02/06/2017 08:44, Andrzej Krzemienski via Boost wrote:
> 2017-06-01 14:15 GMT+02:00 Peter Dimov via Boost <boost_at_[hidden]>:
> And we should also bare in mind Niall's opinion, that if he agrees to a
> narrow contract, such function should spell longer than `value()`.
I don't mind all-narrow at all. Hard to accidentally get wrong.
I do object to mixed narrow and wide where narrow is quicker to type
than wide, and the object is being used to transport uncertainty. It
demands too much understanding of detail by the average programmer.
Regarding the debate about narrow contracts, if one bases
outcome/result/expected on std::variant as I believe one probably ought
to, then as std::variant doesn't offer narrow contracts, neither could
-- 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