<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"John Bossons" <jbossons@gmail.com><br><b>To: </b>"Archie Cobbs" <archie.cobbs@gmail.com><br><b>Cc: </b>"Remi Forax" <forax@univ-mlv.fr>, "Pedro Lamarão" <pedro.lamarao@prodist.com.br>, "valhalla-dev" <valhalla-dev@openjdk.org><br><b>Sent: </b>Tuesday, February 27, 2024 8:36:13 PM<br><b>Subject: </b>Re: Recursively comparing<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr">Yes, but 'deep' only for (small) value objects that are stored by value.</div></blockquote><div><br></div><div>No, the semantics of a value class instance is independant of the storage, calling == on a value object always behave the same way.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 27, 2024 at 12:09 PM Archie Cobbs <<a href="mailto:archie.cobbs@gmail.com" target="_blank">archie.cobbs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Tue, Feb 27, 2024 at 10:48 AM John Bossons <<a href="mailto:jbossons@gmail.com" target="_blank">jbossons@gmail.com</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Where the set of field values stored for a value object field contains a field that is in turn a value object, this recursive definition would imply a recursive application of == to the set of field values stored for that object, would it not? Which sounds awfully close to a deep equals test for value object fields (but not identity fields).</div></blockquote><br>That's a good point... so a simple (for Java developers) way to explain the behavior might be: "Deep equals" for value objects and "== equals" for non-value objects.</div><div class="gmail_quote"><br></div><div class="gmail_quote">-Archie<br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Phone:  (416) 450-3584 (cell)</div></div><br></blockquote></div></div></body></html>