
On Thu, May 22, 2025 at 11:24 AM Joaquin M López Muñoz via Boost < boost@lists.boost.org> wrote:
I've been tempted to introduced an insert_hash_value method, but this looks mighty dangerous for the casual user.
I am all for creating simple but usable interfaces, yet we need to be careful about who is in our target audience. "Casual" users of Bloom filters will be more technically savvy than casual users of say, vectors. You can go your entire career without ever using or hearing about Bloom filters. `insert_hash_value` is an important function for setting filter entries in more than one container without re-computing digests.. Eventually someone is going to want this API.
It's there just for consistency with container APIs. It also supports the incredibly unlikely case of uses-allocator constuction, but this is admittedly not a real motivation:
I am growing increasingly convinced that the adherence to a container-like API is providing meager returns.
Since the container does not store elements, you could probably make this library not-header-only and instead come as a compiled lib component, which of course I would find preferable for all the benefits that compiled libraries provide. Faster compile times, reduced executable bloat, opportunities for increased compiler optimizations. Thanks