On Sat, 27 Jan 2024 07:52:56 GMT, David Alayachew <d...@openjdk.org> wrote:

>> Adding a function to Objects in order to facilitate equality checking and 
>> enhance readability. You simply specify the 2 objects that you want to check 
>> for equality, and then provide the functions which will be used to provide 
>> the values that we will check for equality.
>
> David Alayachew has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Rather than reiterating the precondition, let's explain why the method 
> failed

I fail to see the point of this new API. Existing `ObjectMethods::bootstrap` 
already achieves the same functionality in a better way (though the user code 
looks a bit more conplex), as its produced MethodHandle can be stored in a 
static final field and constant-fold by the JIT, while this method's argument 
array can't as Java arrays are not constants, and this method is polymorphic.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17603#issuecomment-1913188740

Reply via email to