[records] Time to re-read JEP 359
amaembo at gmail.com
Sat Jan 4 15:35:14 UTC 2020
I was watching a Twitch stream by Nicolai Parlog  who explored the
records feature. Quite expectedly he did this reading JEP 359, rather
than the spec draft. He noticed at least two inconsistencies:
1. The record's body may declare static methods, static fields, static
initializers, constructors, instance methods, instance initializers,
and nested types.
"intance initializers" part should be removed, to match the spec draft.
2. Any of the members that are automatically derived from the state
description can also be declared explicitly.
private final fields that match the record components are members and
derived from the state description, so from this statement, one could
conclude that explicit field declaration is also possible (which is
not an unreasonable thing to do: one may want to customize the field
annotations). If we don't allow such a declaration, this statement
should be refined (probably changing 'members' to 'methods and
constructor' or 'members except field' or something like this).
With best regards,
 https://www.twitch.tv/videos/529899179 (link may become invalid in
a month or so)
More information about the amber-spec-experts