
Boost : 
From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 20021023 12:40:39
 Original Message 
From: "Paul A. Bristow" <boost_at_[hidden]>
To: "Boost" <boost_at_[hidden]>
Sent: Wednesday, October 23, 2002 1:12 PM
Subject: [boost] two_pi or pi_twice?
> I had previously produced a naming scheme for constants, but this is now
> in conflict with the naming scheme using by the recently introduced
Interval
> Library.
>
> So I would appreciate views (I have a zero expectation of any consensus!!)
on
> the relative attractiveness of two schemes:
>
>
> Previous Meth Constant Naming Convention
>
> [details snipped]
>
> Or should it be the Interval library convention that puts the constant
name
> first  an obvious plus point when making ordered lists  all the pi
constants
> will come together.
>
> [details snipped]
>
FWIW, my own constants use *exactly* (word by word I think) the naming
convention you proposed.
> And while I am seeking views on names, do the following seem sensible:
>
> Explicit typed names
>
> pi_f // float
> pi_d // double
> pi_l // long double or pi_l ??
> // Potential ambiguity of long int and long double here!
> // C standard ISO 9899:1999 (a.k.a. C99) choses _l for long double
> pi_i // integer
> pi_li // long integer // or pi_l conflists with C99 ??
>
What about unsigned constants?
I'd rather use a 'type + (optional) modifier' postfix scheme:
type:
f=floating point
i=integral
modifiers:
s=short
l=long
u=unsigned
pi_fs (float)
pi_f (double)
pi_fl (long double)
pi_i (int)
pi_il (long int)
pi_iu (unsigned int)
> Interval limit static const constant variable names  add _l and _u
>
These will be easely confused with the 'type' postfix.
I'd use prefix instead:
lower_pi_fl
higher_pi_fl
>
> Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
> +44 1539 561830 Mobile +44 7714 33 02 04
> Mobile mailto:pabristow_at_[hidden]
> mailto:pbristow_at_[hidden]
>
Fernando Cacciola
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk