[External] Foo / Foo.ref is a backward default; should be Foo.val / Foo

2022-04-24 Thread Kevin Bourrillion
Hi, The current plan for `primitive class Foo` -- to call the value type `Foo` and the reference type `Foo.ref` -- is causing a few problems that I think are unnecessary. I've felt for a while now that we are favoring the wrong default. We should let `Foo` be the reference type and require `Foo.va

Re: Objects vs. values, the continuation

2022-04-24 Thread Kevin Bourrillion
On Sun, Apr 24, 2022 at 11:58 AM Brian Goetz wrote: I think what is missing from our presentation — and likely key to > succeeding — is how to describe “compound value” in a way that feels like a > thing. > Well, a `double` is already a compound value that feels like a thing. Java just hides the

Re: Objects vs. values, the continuation

2022-04-24 Thread Kevin Bourrillion
On Sun, Apr 24, 2022 at 6:23 PM Remi Forax wrote: As we discussed earlier, there are two approaches, one is to say that > instance of class = object | value > the other is to say that > instance of class = object = reference object | immediate object > > I prefer the later to the former, bec

Re: [External] : Re: Objects vs. values, the continuation

2022-04-24 Thread Brian Goetz
I agree totally, the former are semantic properties and the latter is a side effect of representation. But that doesn’t help us much, because if people assume that these have the same finial field safety / integrity properties as reference objects, they will be in for a painful surprise. So th

Re: Objects vs. values, the continuation

2022-04-24 Thread Remi Forax
> From: "Remi Forax" > To: "Kevin Bourrillion" > Cc: "valhalla-spec-experts" > Sent: Monday, April 25, 2022 12:23:32 AM > Subject: Re: Objects vs. values, the continuation >> From: "Kevin Bourrillion" >> To: "valhalla-spec-experts" >> Sent: Saturday, April 23, 2022 12:38:12 AM >> Subject: Obj

Re: Objects vs. values, the continuation

2022-04-24 Thread Remi Forax
> From: "Brian Goetz" > To: "Kevin Bourrillion" > Cc: "valhalla-spec-experts" > Sent: Sunday, April 24, 2022 5:57:57 PM > Subject: Re: Objects vs. values, the continuation > Overall I find a lot to like about this presentation. I’m still a little iffy > about whether we can redefine the letters

Re: Objects vs. values, the continuation

2022-04-24 Thread Remi Forax
> From: "Kevin Bourrillion" > To: "valhalla-spec-experts" > Sent: Saturday, April 23, 2022 12:38:12 AM > Subject: Objects vs. values, the continuation > I'd like to remind everyone about this (self-important-sounding) document I > shared some months ago: [ > https://docs.google.com/document/d/1J

Re: Objects vs. values, the continuation

2022-04-24 Thread Brian Goetz
Overall I find a lot to like about this presentation. I’m still a little iffy about whether we can redefine the letters o-b-j-e-c-t in this way, but that is largely a “syntax” reaction to your statements; the substance of the statements sounds about right. I especially like this bit: The way