www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Proper generic way to get the hash of something?

reply Tofu Ninja <joeyemmons yahoo.com> writes:
What is the proper generic way to get the hash of something? It 
seems that hashOf has been changed to no longer call toHash on 
anything.... Just blindly casts to void[]. It actually seems now 
toHash doesn't call any of the specializations of 
core.internal.hash.hashOf except the one for void[]. The change 
seems pretty dumb and broke my code, not sure why it was done, 
the breakage is not in the change log :/.

So what is the proper way to get the hash of something now?
Dec 03 2016
next sibling parent reply Tofu Ninja <joeyemmons yahoo.com> writes:
Actually better question, why was this breaking change allowed? 
The semantics of hashOf have completely changed, why was this 
done??????
Dec 03 2016
parent reply Tofu Ninja <joeyemmons yahoo.com> writes:
Well for now I am going to revert back to 2.071.2, 2.072 seems 
broke as fuck.
Dec 03 2016
parent Seb <seb wilzba.ch> writes:
On Sunday, 4 December 2016 at 07:50:26 UTC, Tofu Ninja wrote:
 Well for now I am going to revert back to 2.071.2, 2.072 seems 
 broke as fuck.
For the record: it has been reverted: https://github.com/dlang/druntime/pull/1707 and thus should be part of the next point release.
Dec 11 2016
prev sibling parent John C <johnch_atms hotmail.com> writes:
On Sunday, 4 December 2016 at 06:51:24 UTC, Tofu Ninja wrote:
 So what is the proper way to get the hash of something now?
This question came up a few days ago: http://forum.dlang.org/post/o1igoc$21ma$1 digitalmars.com
Dec 04 2016