Re: Record and annotation values

2018-04-09 Thread Brian Goetz
I agree, i do not think it's a good idea to introduce record as annotation value just because we can but that's not the reason why i think we should introduce record as annotation value. There is a lot of time where you can construct an annotation with invalid values but those invalid annota

Re: Record and annotation values

2018-04-08 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "amber-spec-experts" > > Envoyé: Dimanche 8 Avril 2018 23:33:33 > Objet: Re: Record and annotation values > I think this is one in the category of "just because you ca

Re: Record and annotation values

2018-04-08 Thread Brian Goetz
I think this is one in the category of "just because you can, doesn't meant you should."  So before discussing mechanisms, let's discuss goals. Annotations are for metaDATA.  The restriction on what you can put in an annotation stems in part from what you can put in the constant pool, but bust

Record and annotation values

2018-04-08 Thread Remi Forax
Currently annotation values are limited to what is encodable as a constant in the constant pool. With Condy, we can expand the number of values that can be encodable as a constant in the constant pool to the infinity by allowing a reference to any non-mutable class to be encoded as an annotation