RFR(xs): 8199394: Object.hashCode should not mention anything about memory addresses

forax at univ-mlv.fr forax at univ-mlv.fr
Fri Dec 7 19:49:36 UTC 2018


:)
yes, you're right.

Rémi

----- Mail original -----
> De: "Andrew Dinn" <adinn at redhat.com>
> À: "Remi Forax" <forax at univ-mlv.fr>, "Stuart Marks" <stuart.marks at oracle.com>
> Cc: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Vendredi 7 Décembre 2018 14:55:44
> Objet: Re: RFR(xs): 8199394: Object.hashCode should not mention anything about memory addresses

> On 07/12/2018 10:31, Remi Forax wrote:
>> Hi Stuart,
>> what about adding "tries to" to the @implSpec section
>> 
>> As much as is reasonably practical, the {@code hashCode} method defined
>> by class {@code Object} tries to return distinct integers for distinct objects.
> 
> An algorithm can try? I suspect not until we reach the singularity so
> beloved of sci-fi hacks (I'm not holding my breath). So, in the
> interests of precisely nailing the colour of this bike-shed and modulo
> any unforeseen developments in Artificial Intelligence, I'd suggest this
> psychologism-free alternative:
> 
> As far as is reasonably practical, the {@code hashCode} method defined
> by class {@code Object} returns distinct integers for distinct objects.
> 
> regards,
> 
> 
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the core-libs-dev mailing list