<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;">
<p dir="auto">I could live with this. It doubles down on “everything is an object”, and something might be modeled separately as a non-object a “value”, is just a sub-kind of object, hence “value object”.</p>
<p dir="auto">So the real big divide is not between objects and non-objects, but between value-objects and identity-objects. And, as befits a world where everybody is in the object family, it’s a gentle divide, since values and identities have lots in common: references, methods, <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">extends Object</code>. Meanwhile, the symmetric difference of value and identity contains, on the one side, the option for “direct” storage (whatever that means; it’s vague but real), and on the other side mutability, etc.</p>
<p dir="auto">A couple more comments below:</p>
<p dir="auto">On 11 Aug 2022, at 13:08, Brian Goetz wrote:</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">…So:</p>
<p dir="auto"> - classes have instances, which are objects
<br>
- some classes are identity classes and some are value classes
<br>
- instances of identity classes have identity, are called identity objects
<br>
- instances of value classes have no identity, are called value objects
<br>
- any objects can be the target of an object reference
<br>
- Polymorphic types like Object or Runnable may refer to identity or value objects
<br>
- value objects can be represented/stored/manipulated directly as well, like our old friend int
<br>
- legacy primitive are value objects now!
<br>
- everything is an object
<br>
- The type P.ref is a reference type, it consists of references to instances of P</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">Tedious pedant is tediously pedantic: or <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">null</code>.</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto"> - The type P.val is a value type, it consists of instances of P, which are value objects
<br>
- Integer is a reference type, int is a value type</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">Maybe emphasize the linkage: <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">Integer.val</code>, <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">int.ref</code> are a aliases for <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">int</code> and <code style="margin: 0; padding: 0 0.4em; border-radius: 3px; background-color: #F7F7F7;">Integer</code></p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">This isn't much different from the previous "VAO" presentation, other than being more explicit about saying "value objects" rather than just values --
<br>
does that help at all?</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">I think it does. Saying “values” unqualified suggests (misleadingly for VAO) that not everything is an object.</p>
</div></div></body>
</html>