From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-05-14 13:16:44
Ed Brey wrote:
> you've opened the door to multiple interfaces, you might as go all the
> way and make as many interfaces as you need to cover all the
> (conflicting) requirements. Give pi to those who want
> qualification-free (including parentheses) names. Give pi() to those
> who want inlining and constant-folding. Give BOOST_PI to those using C.
If the macros are being used on an implementation-level, that is fine
with me. I doubt that "C" people will download boost, though, because
it is announced as a "collection of C++ libraries". Thus, we may miss
this user group entirely.
If macros are used, those macros should not be visible by default when
user code chooses to use the inline function (or constants) style
> To pull everything together (and make things look a little less designed
> by committee) you could consider pi the primary interface,
I still like the inline function style interface better, and I'm
wary of having several interfaces. If several interfaces are provided,
I'm very eager to read the rationale and user group identification
in the documentation.
> A general point I'd like to raise deals with providing of derived
> values, like pi/2.
Derived constants are required for optimal precision, because (e.g.)
pi/3 potentially has less than "double" precision when evaluated.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk