Boost logo

Boost :

Subject: Re: [boost] Name and Namespace for Potential Boost Extended Floating-Point
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2011-09-01 07:39:19


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Joshua
Juran
> Sent: Thursday, September 01, 2011 9:12 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Name and Namespace for Potential Boost Extended Floating-Point
>
> On Aug 31, 2011, at 10:46 AM, Simonson, Lucanus J wrote:
>
> > I'd like to see the name be mp_float. I prefer:
> >
> > mp_float
> > mp_int
> > mp_rational
> >
> > Obviously we need the mp_ prefix if we use float and int since these
> > are keywords without it.
>
> How about
>
> floating
> integer
> rational
>
> > Also, if the user puts using namespace boost::multiprecision then they
> > will benefit from the prefix.
>
> If the user writes "namespace mp = boost::multiprecision;", then the mp_ prefix is redundant and
ugly. If
> you really prefer to write mp_float to mp::floating, you can still "typedef
boost::multiprecision::floating
> mp_float;".
>
> > I prefer multiprecision to mp since the library name I'm guessing
> > would be multiprecision and it is conventional to have the namespace
> > be the same as the library name.

> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Joshua
Juran
> Sent: Thursday, September 01, 2011 9:12 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Name and Namespace for Potential Boost Extended Floating-Point
>
> On Aug 31, 2011, at 10:46 AM, Simonson, Lucanus J wrote:
>
> > I'd like to see the name be mp_float. I prefer:
> >
> > mp_float
> > mp_int
> > mp_rational
> >
> > Obviously we need the mp_ prefix if we use float and int since these
> > are keywords without it.
>
> How about
>
> floating
> integer
> rational
>
> > Also, if the user puts using namespace boost::multiprecision then they
> > will benefit from the prefix.
>
> If the user writes "namespace mp = boost::multiprecision;", then the mp_ prefix is redundant and
ugly. If
> you really prefer to write mp_float to mp::floating, you can still "typedef
boost::multiprecision::floating
> mp_float;".
>
> > I prefer multiprecision to mp since the library name I'm guessing
> > would be multiprecision and it is conventional to have the namespace
> > be the same as the library name.

Having given this matter some thought before Chris laid ideas for your input, perhaps I can give my
twopennyworth.

multiprecision really is the right name for both a library Boost.Multiprecision,

and thus for the enclosing namespace boost::multiprecision.

All the 'Big' variant names seem passé, and not quite right - or example, we *could* include
floating-point types with smaller precision than float - for embedded systems. Who needs 6 decimal
digits precision for a toaster ;-)

Abbreviating the library name to MP is just acronymitis (and raises hackles of those who have
already 'claimed' the letter letters M and P for various other purposes).

Adding a trailing _ is ugly, and confused with similar nasty conventions like member functions/data,
so this is an 'over my dead body' proposal.

The shortness of real is neat, though I agree it is not strictly mathematically right.

I could live with floating, integer (integral?) and rational.

(and perhaps also decimal? - Where do decimal types - proposed, and implemented - fit into this
scheme?)

So FWIW, I'll go with

boost::multiprecision::floating, integer and rational

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow_at_[hidden]

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