You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: