Equality

John Rose john.r.rose at oracle.com
Sat Dec 19 10:23:14 UTC 2015


On Dec 18, 2015, at 9:48 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
> 
> So perhaps what this says is we are going to get pushed in the other direction -- that we'll want to superate equals().  

Because equals is symmetric, coders use it in both directions, and the net result is you
probably end up seeing both directions at once.

To put it another way, it is removeAll(Collection<?>) because,
even if equals has a "direction", you don't know in which order
the operands are passed to equals, within an implementation
of removeAll.

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/valhalla-spec-experts/attachments/20151219/16008b6f/attachment.html>


More information about the valhalla-spec-experts mailing list