Recursively comparing
John Bossons
jbossons at gmail.com
Tue Feb 27 19:36:13 UTC 2024
Yes, but 'deep' only for (small) value objects that are stored by value.
On Tue, Feb 27, 2024 at 12:09 PM Archie Cobbs <archie.cobbs at gmail.com>
wrote:
> On Tue, Feb 27, 2024 at 10:48 AM John Bossons <jbossons at gmail.com> wrote:
>
>> 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).
>>
>
> 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.
>
> -Archie
>
> --
> Archie L. Cobbs
>
--
Phone: (416) 450-3584 (cell)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20240227/597d20bb/attachment.htm>
More information about the valhalla-dev
mailing list