generic specialization design discussion

Remi Forax forax at
Tue Apr 9 19:36:28 UTC 2019

----- Mail original -----
> De: "Brian Goetz" <brian.goetz at>
> À: "Doug Lea" <dl at>
> Cc: "valhalla-spec-experts" <valhalla-spec-experts at>
> Envoyé: Mardi 9 Avril 2019 19:04:36
> Objet: Re: generic specialization design discussion

> OK, let’s make this problem a little simpler.  The question of terminology in
> the JVMS is harder, but we have a syntax decision to make at the source code
> level.  So far its been proposed we replace “value class” with
>    inline class Foo { }
> In addition to liking the sound of it, I like that it is more “modifer-y” than
> “value”, meaning that it could conceivably be applied to other entities:
>    inline record R(int a);
>    inline enum Foo { A, B };

It's very Kotlinish.

I like it more because it's not 'value' than for its name per se.
I have started to dislike 'value' because it has moved the cursor too much to the primitive side (Complex) and less to the abstraction side (Optional).

I think that choosing 'inline' is a step to the right direction.

The right direction obviously being the one where we all acknowledge that == being the substitutability test should be opt-in :)


>> On Apr 8, 2019, at 7:50 PM, Doug Lea <dl at> wrote:
>> On 4/8/19 6:44 PM, John Rose wrote:
>>> If we move terms around so "value" gets replaced by "inline",
>>> and "reference" by "indirect", only the first two lines are
>>> affected:
>>> “inline object”, “indirect object” (also inline or indirect instance)
>>> “inline class”, “indirect class” (also inline or indirect type)
>> It would be nice not to use new terms for old concepts (even if new to
>> Java). For alternative terminology originally stemming from similar
>> struggles to make such distinctions, see UML "Composition" vs
>> "aggregation" (also vs "association"). Wikipedia has some definitions:
>> The UML specs say more but behind wall at
>> -Doug

More information about the valhalla-spec-observers mailing list