for review: 8236522: "always atomic" modifier for inline classes to enforce atomicity

Brian Goetz brian.goetz at
Mon Mar 9 15:13:21 UTC 2020

While this makes sense (references to identity objects are 
non-tearable), I'm not sure that is what the users will actually take 
away from what you propose.  If a user sees the equivalent of:

class Point implements NonTearable {
     int x;
     int y;

this is pretty easy to misinterpret.  And, unlike IdentityObject, I 
don't really see the static type ever being used as a type (e.g., `<T 
extends NonTearable>`.) Non-tearability is a low-level thing; attaching 
it to identity classes makes that harder to see.

On 3/7/2020 6:18 PM, John Rose wrote:
> I’d like to
> suggest that IdentityObject implements NonTearable, so that
> bounds like Record & NonTearable allow identity and inline
> objects.

More information about the valhalla-spec-observers mailing list