It looks like we're getting somewhere; thanks for
the detailed response. I have one targeted reply:
On May 1, 2019, at 4:38 PM, fo...@univ-mlv.fr wrote:
>
> So let's call it V*. I want also make clear that there is no proposal to not
> have a V*, we need it, and it's the L-version of an inline
- Mail original -
> De: "John Rose"
> À: "Brian Goetz"
> Cc: "Remi Forax" , "valhalla-spec-experts"
>
> Envoyé: Jeudi 2 Mai 2019 00:55:19
> Objet: Re: Is V? what we need ?
> On May 1, 2019, at 7:50 AM, Brian Goetz wrote:
>>
>>> I fully agree, it's like getting ride of Integer, it's
I buy your argument, Brian, for shedding boxes from
the center of the user model for V and V?.
Given that V and V? have different contracts (per my
previous note), so that they can have different physical
representations in the JVM, it turns out that this statement:
V is a subtype of V? (for
On May 1, 2019, at 7:50 AM, Brian Goetz wrote:
>
>> I fully agree, it's like getting ride of Integer, it's a fantasy, but not
>> having a lot of API taking a N? as parameter type make that fantasy actually
>> possible for the libraries you care.
>
> We can’t get rid of Integer, but maybe we
On May 1, 2019, at 6:28 AM, Brian Goetz wrote:
>
> Also, we’re conflating two separate questions here.
>
> 1. What does V? mean. In the proposed world, it is the union type of V and
> Null, nothing more (alternately: V adjoined with null.).
>
> 2. What is the relationship between V and
On May 1, 2019, at 7:39 AM, Brian Goetz wrote:
>
> This is the point I’ve been failing to get across to Remi as well. Suppose
> you have a big value, and you want a sparse ArrayList of that value? You
> need a way to say “Arraylist of BigValue, but not flattened.” And that’s a
> use-site
However, I think my more general point remains - the fact that the VM
has the flexibility to treat V and V? as, fundamentally, the same
thing shouldn't necessarily drive the conclusion that, _at the
language level_ there should be a subtyping relationship between V and
V?.
From a
I agree with Brian that most of the 'conversion-like' nature we see in V
to V? is likely associated with Q-thinking, after having been a victim
of it myself in a private conversation :-)
However, I think my more general point remains - the fact that the VM
has the flexibility to treat V and
- Mail original -
> De: "Brian Goetz"
> À: "Doug Lea"
> Cc: "valhalla-spec-experts"
> Envoyé: Mercredi 1 Mai 2019 16:39:59
> Objet: Re: Is V? what we need ?
> This is the point I’ve been failing to get across to Remi as well. Suppose
> you
> have a big value, and you want a sparse
Actually,
you are more on my side because what i'm proposing make V? less present in
public methods of API, which i think is a good move in term of perf model and
for ArryList, both proposal work the same.
Rémi
- Mail original -
> De: "Doug Lea"
> À: "valhalla-spec-experts"
> Envoyé:
>
> I fully agree, it's like getting ride of Integer, it's a fantasy, but not
> having a lot of API taking a N? as parameter type make that fantasy actually
> possible for the libraries you care.
We can’t get rid of Integer, but maybe we can make it 10x less important. That
would be winning.
- Mail original -
> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "Maurizio Cimadamore" ,
> "valhalla-spec-experts"
>
> Envoyé: Mercredi 1 Mai 2019 16:12:05
> Objet: Re: Is V? what we need ?
>>> Boxes are not a good thing; they were a necessarily evil that arises from
>>> the
>>> fact
This is the point I’ve been failing to get across to Remi as well. Suppose you
have a big value, and you want a sparse ArrayList of that value? You need a
way to say “Arraylist of BigValue, but not flattened.” And that’s a use-site
concern. ArrayList gives you that.
Which is to say: the
On 5/1/19 10:12 AM, Brian Goetz wrote:
>
> You’re assuming the utility of V? after reification is zero, but
> that’s not the case. For example, suppose ArrayList is reified. Then
> the user gets the choice of erasure or reification by selecting
> ArrayList or ArrayList. Erasure has a bad rap,
> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "valhalla-spec-experts"
> Envoyé: Mercredi 1 Mai 2019 15:24:42
> Objet: Re: Is V? what we need ?
>> a box is a necessary evil, everybody want to write an ArrayList but we
>> are
>> not there yet, so we provide just the right abstraction to deal with
>> Boxes are not a good thing; they were a necessarily evil that arises from the
>> fact that primitives are not objects. But they create many problems of their
>> own. I don’t see how “more boxes” is the answer here.
>
> More boxes is a temporary answer until we have fully reified generics
- Mail original -
> De: "Brian Goetz"
> À: "Maurizio Cimadamore"
> Cc: "Remi Forax" , "valhalla-spec-experts"
>
> Envoyé: Mercredi 1 Mai 2019 15:13:06
> Objet: Re: Is V? what we need ?
> But, this is Q-world thinking. In Q-world, values are like primitives, and we
> therefore need
Also, we’re conflating two separate questions here.
1. What does V? mean. In the proposed world, it is the union type of V and
Null, nothing more (alternately: V adjoined with null.).
2. What is the relationship between V and V? — is it sub typing, or
conversion?
I think Remi is more
>
> a box is a necessary evil, everybody want to write an ArrayList but we
> are not there yet, so we provide just the right abstraction to deal with
> value type in generics, not more.
I think this is where we part ways. In Java 1.0, with respect to primitives, a
box was a necessary evil,
- Mail original -
> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "valhalla-spec-experts"
> Envoyé: Mercredi 1 Mai 2019 15:03:42
> Objet: Re: Is V? what we need ?
>> we need V?
>> - to represent the L variation of a Q type.
>> - to interact with generics that are not reified.
>
> These
But, this is Q-world thinking. In Q-world, values are like primitives, and we
therefore need boxes to interoperate with objects. In L-world, values *ARE*
Object. The difference is huge, and it takes some time to internalize just how
different they are. We’re all in varying degrees of
I agree, in principle - and I have raised similar points in the past,
that is:
V ~= int
V? ~= Integer
And have NO subtyping relationship between them; this puts the language
on a solid footing, where we reuse existing conversion mechanism to
sequence overload resolution and all that.
I
> we need V?
> - to represent the L variation of a Q type.
> - to interact with generics that are not reified.
These are the proximate causes, but I think this undersells it.
> V? does that but does far more, V? is a super type of V which is dangerous,
> because people will use it as
Brian ask me to make it its own thread.
so is V? what we need, because i believe we have been a little over our own
head on this and loose the sight of what we need for V?.
we need V?
- to represent the L variation of a Q type.
- to interact with generics that are not reified.
V? does that but
24 matches
Mail list logo