Recursively comparing
John Bossons
jbossons at gmail.com
Tue Feb 27 16:48:41 UTC 2024
I would suggest "Note that this definition is recursive in the case of
value object fields, *meaning that the value tested by == in that case is
the set of field values stored for such fields*" -- if this is correct.
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).
On Tue, Feb 27, 2024 at 11:24 AM Archie Cobbs <archie.cobbs at gmail.com>
wrote:
> I am a native English speaker but I also found this slightly confusing :)
>
> The problem is, for better or worse, the word "recursive" is too closely
> associated with the phrase "deep equals" in people's minds.
>
> Maybe it could be clarified a bit: "Other field values—both identity and
> value objects— are compared using the == operator. Note that this
> definition is recursive in the case of value object fields".
>
> -Archie
>
> On Tue, Feb 27, 2024 at 9:08 AM Remi Forax <forax at univ-mlv.fr> wrote:
>
>> So if 'o' is an identity object, like String, the address will be used
>> and if 'o' is itself a value type, like Foo, then == becomes a recursive
>> call.
>>
>> Is it more clear ?
>>
>
> --
> 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/795943bf/attachment.htm>
More information about the valhalla-dev
mailing list