On 23-mar-10, at 23:02, Walter Bright wrote:

Fawzi Mohamed wrote:
I think that the public interface should be exposed (or re-exposed) somewhere to the outside so that one can easily create efficient hashes for user defined types. For example it is nice to be able to chain hash functions (something that the default one does not allow).

Just overload the toHash() function for your user-defined type to be whatever you want it to be.

I know, maybe I have not expressed myself clearly, but this overridden function has to be written. For objects combining various pieces, one has to create a unique hash from various pieces. The functions I have defined in hash.d help in doing that is such a way that changing a bit anywhere most likely changes the whole hash.

Reply via email to