On Fri, Apr 2, 2010 at 7:01 AM, Sean Owen <sro...@gmail.com> wrote: > What's the use case for needing to vary the hash function? It's one of > those things where I assume there are incorrect ways to do it, and > correct ways, and among the correct ways fairly clear arguments about > which function will be better -- i.e. the object should provide the > best function. > > I don't think subclassing or wrapping is a big deal in the rare case > you need this. But perhaps I am missing the use case. >
I'm not the inventor of the strategy pattern here so I'm not a hard advocate. What seemed relevant to me was how irritating it would be to have to resubclass OpenObjectXXXHashTable<T> for each of the XXX primitives if you needed more than one.