Boost logo

Boost :

Subject: Re: [boost] [atomic] (op)_and_test naming
From: Frank Mori Hess (fmh6jj_at_[hidden])
Date: 2018-01-25 23:30:54


On Thu, Jan 25, 2018 at 6:03 PM, Peter Dimov via Boost
<boost_at_[hidden]> wrote:
> Consistency and intuition are in conflict here. These function are presently
> specified the way they are specified for a reason - this is what makes more
> sense in the context in which they are typically used. You can use
> consistency to justify a choice, but you can't magically make people not be
> confused by the choice.
>
> This is similar to the bool conversion of std::error_code, which is also
> perfectly consistent and still manages to return the opposite of what a
> certain fraction of the audience intuitively expects.

I haven't been following this specific discussion closely, but in
general, I wish designers put a higher value on consistency than on
trying to guess what the audience's expectations are. Consistency
leads to tools whose behavior can be reasoned about and competence
with can be achieved. Guessing what the people want leads to
incomprehensible black boxes that the user pokes at, hoping it will
guess what they want it to do.

-- 
Frank

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk