Is this a problem?
hash_value(0);
(1) Result: 0
hash_value(Math.inf);
(2) Result: 0
hash_value(Math.nan);
(3) Result: 0
The first part shouldn't be a problem. Hashes are not guaranteed to be unique.
I can't say why you get different values every time you hash the String module. It would seem like you actually create a new instance of String every time you hash it. If you do this:
mixed x = String; hash_value(x);
(3) Result: 8486372
hash_value(x);
(4) Result: 8486372
You get a more expected result. This may actually be a problem, but I can't say for sure.
pike-devel@lists.lysator.liu.se