Boost.Sort library hierarchy and namespacing
For the Boost.Sort library, I'm planning to add these (non-detail) files: boost/sort/sort.hpp boost/sort/spreadsort/spreadsort.hpp boost/sort/spreadsort/integer_sort.hpp boost/sort/spreadsort/float_sort.hpp boost/sort/spreadsort/string_sort.hpp Should all of these be in the boost::sort namespace? It seems silly to have a boost::sort::spreadsort namespace when there are only 5 publicly-visible functions in it. I actually can't imagine how of these names will conflict with names in other boost libraries, but using a boost::sort namespace appears conventional. Are there any objections or concerns based on this? Once this is done, I'd like to integrate this library into the boost build and testing system for the next appropriate release (I test it currently with modular boost).
On 2014-12-09 06:30, Steven Ross wrote:
For the Boost.Sort library, I'm planning to add these (non-detail) files: boost/sort/sort.hpp boost/sort/spreadsort/spreadsort.hpp boost/sort/spreadsort/integer_sort.hpp boost/sort/spreadsort/float_sort.hpp boost/sort/spreadsort/string_sort.hpp
Should all of these be in the boost::sort namespace? It seems silly to have a boost::sort::spreadsort namespace when there are only 5 publicly-visible functions in it. I actually can't imagine how of these names will conflict with names in other boost libraries, but using a boost::sort namespace appears conventional.
Are there any objections or concerns based on this?
I would strongly encourage you to make the include path match the namespace; that way there's only one thing for users to remember. So either boost::sort::spreadsort::integer_sort in boost/sort/spreadsort/integer_sort.hpp or boost::sort::integer_sort in boost/sort/integer_sort.hpp John Bytheway
On Mon Dec 22 2014 at 10:25:49 PM John Bytheway
On 2014-12-09 06:30, Steven Ross wrote:
For the Boost.Sort library, I'm planning to add these (non-detail) files: boost/sort/sort.hpp boost/sort/spreadsort/spreadsort.hpp boost/sort/spreadsort/integer_sort.hpp boost/sort/spreadsort/float_sort.hpp boost/sort/spreadsort/string_sort.hpp
Should all of these be in the boost::sort namespace? It seems silly to have a boost::sort::spreadsort namespace when there are only 5 publicly-visible functions in it. I actually can't imagine how of these names will conflict with names in other boost libraries, but using a boost::sort namespace appears conventional.
Are there any objections or concerns based on this?
I would strongly encourage you to make the include path match the namespace; that way there's only one thing for users to remember. So either
boost::sort::spreadsort::integer_sort in boost/sort/spreadsort/integer_sort.hpp
I've done it this way.
participants (2)
-
John Bytheway
-
Steven Ross