
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! -- Dave Abrahams Boost Consulting www.boost-consulting.com

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. Best regards, Guillaume

Guillaume Melquiond <guillaume.melquiond@ens-lyon.fr> 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
participants (2)
-
David Abrahams
-
Guillaume Melquiond