generic specialization design discussion

Remi Forax forax at univ-mlv.fr
Tue Apr 9 19:36:28 UTC 2019


----- Mail original -----
> De: "Brian Goetz" <brian.goetz at oracle.com>
> À: "Doug Lea" <dl at cs.oswego.edu>
> Cc: "valhalla-spec-experts" <valhalla-spec-experts at openjdk.java.net>
> 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 :)

Rémi

> 
> 
> 
>> On Apr 8, 2019, at 7:50 PM, Doug Lea <dl at cs.oswego.edu> 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:
>> https://en.wikipedia.org/wiki/Class_diagram#Aggregation
>> 
>> The UML specs say more but behind wall at https://www.omg.org/spec/UML
>> 
>> -Doug


More information about the valhalla-spec-observers mailing list