Records and annotations (was: Updated document on data classes and sealed types)
John Rose
john.r.rose at oracle.com
Tue Mar 19 04:46:13 UTC 2019
The benefit of default.something is that it can be composed
with ad hoc code, to add assertions, short-circuits, etc.
An empty body notation means you cannot cooperate
meaningfully with the default mechanism.
On Mar 9, 2019, at 6:08 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
>
> An alternate is to allow the body to be left off entirely:
>
> record R(int x, int y) {
> @MyAnnotation
> public boolean equals(Object o);
> }
More information about the amber-spec-experts
mailing list