Date: 2001-04-27 04:22:25
> I fear you gurus are forgetting the confusion caused to novice
> users by the requirement to write pi() rather than plain pi.
That may be the case. I don't rate myself as a guru, but I can't
see what all the fuss is about. If write pi() then it works and
if I write pi then I get a syntax error. I can't think of an
arithmetic context where a pointer to a function would quietly
> (The worse compiler even bombs if you forget the ()!)
I treat compiler crashes as syntax errors. Usually they aren't,
but the "fix" is the same -- change the code.
> Are REALLY sure that just defining long doubles isn't simplest
> and best? Casting down to double or float IS understood, even
> by novices.
Using just a long double constant might require an explicit cast
to avoid provoking a compiler warning. I wouldn't want that. It
also doesn't allow specialisation for other types, like interval
I'm losing track of what has and hasn't been suggested. Have we
considered specialising a class template with a static member?
template<class T> class math
static T const pi;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk