Why Does Dscanner Warn About a Missing toHash if opEquals is Defined?

mlsgmls via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 3 23:07:27 PDT 2016


On Sunday, 31 July 2016 at 18:57:50 UTC, Jack Stouffer wrote:
> On Sunday, 31 July 2016 at 17:48:48 UTC, BLM768 wrote:
>> writeln(n1.hashOf == n2.hashOf); // false = BAD!
>
> Ok, yeah that is bad.
>
> Next question: what's the fastest hashing implementation that 
> will provide the least collisions? Is there a hash 
> implementation that's perfered for AAs?

This could be of interest

http://aras-p.info/blog/2016/08/02/Hash-Functions-all-the-way-down/


More information about the Digitalmars-d-learn mailing list