Record Component attributes
brian.goetz at oracle.com
Wed Oct 9 15:59:56 UTC 2019
> just to be sure, do we agree that a record component can be deprecated, synthetic, have a generic signature, have unknown attributes, have annotation and type annotations ?
Deprecated: not clear what this would mean, since removing a component
is not a BC or SC change, and therefore removal seems unlikely, but I
suppose deprecation could be a "stay away" warning sign for that
component? On the fence.
Synthetic: I think this is a no. The philosophy is: a record is a class
whose representation and API are both derived from the state
description. Having a synthetic component would be weird (same reason
we don't have inner records.)
Generic signature: yes, definitely.
Unknown attributes: I believe that Dan had an opinion here, as reflected
in the current spec draft?
Declaration and type annotations: yes, definitely.
> so the attributes with a special meaning are
> SIGNATURE, DEPRECATED, SYNTHETIC, RUNTIME_VISIBLE_ANNOTATIONS, RUNTIME_VISIBLE_TYPE_ANNOTATIONS, RUNTIME_INVISIBLE_ANNOTATIONS and RUNTIME_INVISIBLE_TYPE_ANNOTATIONS.
> said differently, it's all the attributes allowed on a field but CONSTANTVALUE which makes no sense on a record component.
More information about the amber-spec-experts