-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
When I first decided to create Nevis, I really wanted to see if I could recreate Javas hashCode, equals, and toString methods in JavaScript. I even went as far as to try and get the resulting hash codes as close as possible. However, the Java hashCode implementation can only return a 32-bit signed integer. Basically, it has a much smaller maximum value than an integer in JavaScript and, since hashCodes can generally be very large numbers, Java squeezes them down to fit into a 32-bit signed integer.
My question is; should we try to do the same, as we are now, or simply use the larger values? What are the pros and cons?