where are all the objects?
Kevin Bourrillion
kevinb at google.com
Thu Aug 11 23:06:54 UTC 2022
On Thu, Aug 11, 2022 at 1:08 PM Brian Goetz <brian.goetz at oracle.com> wrote:
We may be circling around the terminology block, but let's try on not
> calling an int or a Point "a value" without some sort of modifier.
>
> Let's try "value object" rather than just "value";
>
Just to be clear, this is about VAO, and under VANO we would still have
distinct meanings for "value" and "value object":
An instance of... Is a...
String identity object
int, Foo.val value
Integer, Foo value object
I agree that what you said is the right way to present VAO. And I do see
the appeal of the story that goes, "when you used to decide between int and
Integer, that was a weighty decision -- is it going to be an object or not?
But now the distance is much closer; it's an object either way, and the
question is only about whether you want a *reference* in the middle. If
that sounds expensive, well, realize it's a much lighter weight object, a
value object."
VANO's story there is more like, "you're still deciding between an object
or value; specifically a *value object* or a value. But now the distance is
much closer, because value objects are so much lighter weight than identity
objects."
I'll repeat that I really don't know yet which of VAO/VANO will prove best,
and also I'm aware of being the only real VANO cheerleader at this point.
It would be nice to widen the net, but it's hard to get an easy
off-the-street opinion from developers about this, given that each model
has its own long tail of weirdnesses/surprises in store, that won't be
represented in the (predictably strong) gut reactions.
--
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-spec-observers/attachments/20220811/9a3279b4/attachment-0001.htm>
More information about the valhalla-spec-observers
mailing list