Subject: Re: [boost] [ratio] namespace ratios
From: Barend Gehrels (barend_at_[hidden])
Date: 2011-01-16 06:59:54


Hi Vicente,

>
> Before moving all the classes on Boost.Ratio from boost:: to boost::ratios:: I wanted to signal that Boost.Ratio follows the names on the C++0x standard and that these names where choosen to be used in the std context and that any class is prefixed by ratio_. If a specific ratios namespace were in their minds, I'm sure that they will not use the ratio_add<> but just add<>. Please let me know if I'm wrong here.
>
> typedef boost::ratios::ratio<1, 2> R1;
> typedef boost::ratios::ratio<1, 3> R2;
> typedef boost::ratios::add<R1, R2> R;
>
> If we put all of them in boost::ratios maybe the class names contains redundant information
>
> typedef boost::ratios::ratio<1, 2> R1;
> typedef boost::ratios::ratio<1, 3> R2;
> typedef boost::ratios::ratio_add<R1, R2> R;
>
>
> Do the Boost community agree with these names or is this one of the special cases that needs consideration?
>

There are

1) libraries using a singular namespace:
boost::archive::
boost::date_time::
boost::filesystem::
boost::fusion::
boost::geometry::
boost::multi_index::
boost::polygon::
boost::property_tree::
boost::serialization::

2) libraries using a plural namespace name:
boost::accumulators::
boost::bimaps::
boost::flyweights::
boost::program_options::
boost::ratios:: (your proposal)
boost::signals:: (named by a renameble macro BOOST_SIGNALS_NAMESPACE)
boost::tuples::
boost::units::

3) libraries using the library suffix:
boost::gil::
boost::icl::
boost::mpl::

4) libraries using a name or abbreviation:
boost::asio::
boost::lambda::
boost::math::
boost::msm::
boost::proto::
boost::spirit::

5) libraries using a verb:
boost::assign::

6) libraries defining functionality within the boost:: namespace:
algorithm
any
bind
graph
iterator
range
smart_prt
thread
variant

(all not exhaustive)

---
So everything seems possible. Personally, I find boost::ratio more 
intuitive then boost::ratios, and indeed the ratio_add might then be 
changed into add. But I understand that it might lead to ambiguity 
because you also have the class name ratio.
Regards, Barend