> From: "Kevin Bourrillion" <kev...@google.com>
> To: "Brian Goetz" <brian.go...@oracle.com>
> Cc: "valhalla-spec-experts" <valhalla-spec-experts@openjdk.java.net>
> Sent: Jeudi 4 Novembre 2021 22:34:54
> Subject: Re: identityless objects and the type hierarchy

> On Wed, Nov 3, 2021 at 12:43 PM Brian Goetz < [ mailto:brian.go...@oracle.com 
> |
> brian.go...@oracle.com ] > wrote:

>> On 11/3/2021 3:00 PM, Kevin Bourrillion wrote:

>>> Okay, let's stick a pin in proper-value-types (i.e. try to leave them out of
>>> this discussion) for a moment...

>>> One question is whether the existing design for the bifurcated type 
>>> hierarchy
>>> will carry right over to this split instead.

> Brian, your response reads like it is explaining/defending that design to me.
> But I believe I already understood it and wasn't expressing any problem with
> it.

> Now we're talking about making a smaller split first, "identity objects vs.
> identityless objects" (1 vs 2, not 1 vs 3), so I was inquiring into why that
> class model does or does not also work exactly as-is for this purpose.

> (Note that I assume if bucket 3's arrival requires another such type in the 
> mix,
> there would be a second such bifurcation under IdentitylessObject.)

I don't think a second bifurcation is needed. 
At runtime bucket 2 and bucket 3 behave the same apart from null. 
Given that IdentitylessObject (or whatever the name we choose) is an interface, 
it always accept null, 
so if they are typed as that interface, B2 and B3 behave exactly the same. 

Rémi 

Reply via email to