On Thursday, 31 July 2014 at 17:39:43 UTC, H. S. Teoh via Digitalmars-d wrote:
It's about time somebody noticed this!!

Why don't we just expose druntime's core.internal.hash.hashOf() function somewhere? It's not as though it isn't already in druntime, so the function is already present in the executable, we just need a public
declaration of it somewhere that users can make use of.

Not to mention, it's already a template function that correctly
calculates the hash of various built-in types.


T

I've often just put "import core.internal.hash;" in my code.

Once we get this solved we need to work on the fact that many hash generation functions are not pure. (Object.toHash not being pure prevents a lot of containers from being used in pure templated code)

Reply via email to