Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-12-08 07:34:51


Guillaume Melquiond <guillaume.melquiond_at_[hidden]> writes:

> Le mercredi 07 décembre 2005 à 11:13 -0500, David Abrahams a écrit :
>> Why isn't this function called zero_in?
>>
>> if (zero_in(x)) whatever...
>>
>> seems a lot more natural than
>>
>> if (in_zero(x)) whatever...
>>
>> After all, the question is whether zero is in x, not whether x is in
>> zero!
>
> Agreed. And it was already been mentioned before, but unfortunately not
> at the time of the review. I am bit reluctant to change the interface of
> a library people have been using for three years now. At least the
> interval proposal does not contain a function with such a name.

the answer is easy: add the new function, deprecate the old one. Then
after a few releases with the old function deprecated, you can decide
if you're comfortable removing it. Otherwise, you can just leave it
in.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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