Re: [boost] Comments on functional/hash

----- Mensaje original ----- De: Peter Dimov <pdimov@mmltd.net> Fecha: Sábado, Abril 2, 2005 1:03 pm Asunto: [boost] Comments on functional/hash
First of all, nice work!
On headers:
* boost::hash defined in <boost/functional/hash.hpp>
Usually (when the number of top-level headers is small) we follow the rule that boost::X is defined in <boost/X.hpp>. This makes it much easier for users to remember what headers need to be included.
I think that hash.hpp needs to be a top-level header.
It was my proposal to put it under <boost/functional/hash.hpp>, on the following rationales: * TR1 hash is located on <functional> * When John Maddock's Boost.TR1 inititative includes Boost.Hash, the naming conventions set up by John suggest that the wrapping header will be <boost/tr1/functional>, which is more consistent with <boost/functional/hash.hpp> than with <boost/hash.hpp> (IMHO). Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

JOAQUIN LOPEZ MU?Z wrote:
It was my proposal to put it under <boost/functional/hash.hpp>, on the following rationales: * TR1 hash is located on <functional> * When John Maddock's Boost.TR1 inititative includes Boost.Hash, the naming conventions set up by John suggest that the wrapping header will be <boost/tr1/functional>, which is more consistent with <boost/functional/hash.hpp> than with <boost/hash.hpp> (IMHO).
I understand the logic, but with my user hat on, I expect boost::hash in <boost/functional.hpp> (since std::tr1::hash is in <functional>) or in <boost/hash.hpp> (because it is defined in namespace boost, not in namespace boost::functional). <boost/functional/hash.hpp> is neither here nor there, IMO. The rest of the headers are fine, and placing hash under libs/functional is fine, too.

On Apr 2, 2005, at 7:49 AM, Peter Dimov wrote:
JOAQUIN LOPEZ MU?Z wrote:
It was my proposal to put it under <boost/functional/hash.hpp>, on the following rationales: * TR1 hash is located on <functional> * When John Maddock's Boost.TR1 inititative includes Boost.Hash, the naming conventions set up by John suggest that the wrapping header will be <boost/tr1/functional>, which is more consistent with <boost/functional/hash.hpp> than with <boost/hash.hpp> (IMHO).
I understand the logic, but with my user hat on, I expect boost::hash in <boost/functional.hpp> (since std::tr1::hash is in <functional>) or in <boost/hash.hpp> (because it is defined in namespace boost, not in namespace boost::functional).
<boost/functional/hash.hpp> is neither here nor there, IMO. The rest of the headers are fine, and placing hash under libs/functional is fine, too.
IMHO, just putting it in <boost/functional.hpp> is the right thing to do. It matches TR1 and avoids another top-level header. Doug

Douglas Gregor wrote:
IMHO, just putting it in <boost/functional.hpp> is the right thing to do. It matches TR1 and avoids another top-level header.
I don't see why it's a good thing to avoid top-level headers when they correspond to a top-level identifier.

On Apr 2, 2005, at 8:12 AM, Peter Dimov wrote:
Douglas Gregor wrote:
IMHO, just putting it in <boost/functional.hpp> is the right thing to do. It matches TR1 and avoids another top-level header.
I don't see why it's a good thing to avoid top-level headers when they correspond to a top-level identifier.
We have a lot of top-level headers, so I'm leery of adding more. Looking at the list of headers is a common way (for me) to find something I'm looking for in a library, and the list of headers we have is quite daunting. I've heard from several people that the sheer size of Boost is getting daunting, and this is one place where we might be a little more picky in the future. Doug

Douglas Gregor <doug.gregor@gmail.com> writes:
On Apr 2, 2005, at 8:12 AM, Peter Dimov wrote:
Douglas Gregor wrote:
IMHO, just putting it in <boost/functional.hpp> is the right thing to do. It matches TR1 and avoids another top-level header.
I don't see why it's a good thing to avoid top-level headers when they correspond to a top-level identifier.
We have a lot of top-level headers, so I'm leery of adding more. Looking at the list of headers is a common way (for me) to find something I'm looking for in a library, and the list of headers we have is quite daunting. I've heard from several people that the sheer size of Boost is getting daunting, and this is one place where we might be a little more picky in the future.
IMO the right solution to that problem is a granular installer that can reliably sort out the dependencies. -- Dave Abrahams Boost Consulting www.boost-consulting.com

It was my proposal to put it under <boost/functional/hash.hpp>, on the following rationales: * TR1 hash is located on <functional> * When John Maddock's Boost.TR1 inititative includes Boost.Hash, the naming conventions set up by John suggest that the wrapping header will be <boost/tr1/functional>, which is more consistent with <boost/functional/hash.hpp> than with <boost/hash.hpp> (IMHO).
I'm not sure that the two have to coincide to that degree, and anyway there is no TR1 Boost lib yet (but watch this space). As long as the hash functions are somewhere sensible it seems fair enough as it is (I've no strong feelings any which way though). John.
participants (5)
-
David Abrahams
-
Douglas Gregor
-
JOAQUIN LOPEZ MU?Z
-
John Maddock
-
Peter Dimov