Note, though, that would only give you a "shallow" hash as pointers and references would be interpreted as their literal bits rather than the data they point to.
hash() *int
}
The user is required for keys to implement the Hashed interface where hash() may return nil.
In that case the segmented map would create some hash on its own using some arbitrary approach
where the hash generator is pluggable so the user can plug in his own in case it doesn't fit
his purpose for some reason.
I'm not sure yet what approach to take for the hash generator. I think I will extract the values
of inst vars that are of a basic type using meta-programming and create a hash out of them. This may
not give the best possible performance, but in Java it is also often done that way and nobody cares about
performance. The hash to be meaningful seems to be more important, otherwise you loose the support
by the users.
Cheers, Oliver
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/TkAqPxbdGEY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.