Boost logo

Boost :

From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2001-04-19 17:27:40


I have looked at this and it is not quite as horrendous a job as I thought
to output both my current C style .h (not for BOOSTERS of course!)
AND a .hpp version as suggested by Ed Brey.

Attached are a partial .hpp file and a demo .cpp

Have I understood your suggestion correctly?

Paul

> -----Original Message-----
> From: rwgk_at_[hidden] [mailto:rwgk_at_[hidden]]
> Sent: Thursday, April 19, 2001 7:03 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: TODAY: Math Constants library formal review starts
>
>
> I agree with Jens.
> Ed Brey's suggestion looks very good to me:
>
> > namespace boost {
> > namespace math {
> > template<typename T>
> > struct constants {
> > static T pi() {return T(3.1415...L);}
> > };
> > }
> > }
> >
> > where a typical user experience would be documented as this:
> >
> > typedef boost::math::constants<float> c;
> > std::cout << "Baseball and apple " << c::pi();
>
> The problem with the undef approach is that it does not work if
> BOOST_UNITY is defined before your header file is included.
> I would encourage you to go back to your original approach
> of writing the C++ header file directly. If your
> names follow *some* kind of consistent scheme, I am your
> first user.
>
> Ralf
>
> --- In boost_at_y..., Jens Maurer <Jens.Maurer_at_g...> wrote:
> > "Paul A. Bristow" wrote:
> > > Indeed that's what I did originally - but without agreement about
> the names!
> >
> > It's easy to quibble about names, and everyone likes to do that.
> >
> > In the case of names, someone (the library submitter) has to make a
> > decision, document which were the rejected alternative naming
> > schemes and move on. People will either adjust to your names or
> > detest them enough to ignore your library, which is less easy
> > if it's of good quality and thus hurts them a lot.
> >
> > (Btw, I didn't have the impression that names were that much a
> > constroversy. Sure, people had different suggestions, but I don't
> > remember any "over my dead body" votes on a particular naming
> > scheme.)
> >
> > In general, having a comprehensible, documented naming scheme
> > (whatever it is) seems important to me. Then, the user can
> > remember the scheme, guess "two_pi" (or "pi_times_2"?) without
> > looking at the documentation and actually has a good chance of
> > finding what he desires.
> >
> > Jens Maurer
>
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>





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