Boost logo

Boost :

Subject: [boost] Namespace for a Boost Hashing Library
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-05-09 12:19:54


I initially used boost::hash, forgetting that the unordered containers
have already claimed that name. A number of alternatives have been
proposed, so I hoped to get some thoughts from the wider community.

The intention for the library is to provide concepts and some
implementations for checksums (like CRC32), plain hash functions (for
hash tables), and cryptographic hash functions (like MD5 or SHA-256).

Some possibilities:

- boost::hashes
Following the usual boost method of a plural namespace when a class exists.

- boost::hash_algo or boost::hash_algorithms
Following the string_algo precedent.

- boost::hashing or boost::hashing_algorithms
Using a gerund for a change.

- boost::digests or boost::message_digest
Using the name of the result of a hash, rather than the process.

- boost::fingerprint (or boost::dactylogram)
An alternative name for the result of a hash.

- Something else better that you come up with

Some complaints raised about those options:

- boost::hashes or boost::hashing or boost::digests
It's hard to remember when namespaces aren't singular as usual
(especially for the first two, when the library doesn't provide
anything named "hash").

- boost::hash_algo
It would be better to not use an abbrev.

- boost::hash_algorithms or boost::hashing_algorithms or boost::message_digest
Shorter namespaces are generally preferred, where possible.

- boost::fingerprint (or boost::dactylogram)
Implies a particular use and certain minimum length of result.

Which one(s) do you prefer or dislike?

Thanks,
~ Scott McMurray


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