on implementing state components as a first class concept

Vicente Romero vicente.romero at oracle.com
Fri May 3 12:57:44 UTC 2019



On 5/2/19 4:24 PM, Maurizio Cimadamore wrote:
>
> On 02/05/2019 19:06, Joe Darcy wrote:
>> The above is a summary of the initial implementation in the amber 
>> repo where the fields corresponding to the state components were 
>> marked with an ElementKind of STATE_COMPONENT rather than FIELD :-)
>
> I don't think so - if you go down the 2b path, you have fields, and 
> then you compute state elements from there, on the fly.
>
> In any case, as long as the API returns the correct answers, I don't 
> think it should matter as to whether javac is internally able to reuse 
> the field symbol for both the field and the state component? Vicente 
> was under the impression that we needed to duplicate, I'm just trying 
> to point out that I don't immediately see that necessity.

I agree that we should explore all the options to provide the right 
answers to the API clients without needing to provide two field-like 
entities inside a record. That should be our last resort,

>
> Maurizio
>
Vicente


More information about the amber-dev mailing list