Feedback on JEP 468: Derived Record Creation
Jos Angel George
josangel555 at gmail.com
Thu Mar 28 02:23:00 UTC 2024
Hi Amber team,
Super excited about JEP 468!
Can we use the with syntax for Constructor as well? This syntax feels very
natural compared to the currently proposed record derivation syntax (Builder
vs toBuilder). For me, this will be the final missing piece to ditch a
library like Lombok.
record Color(int r, int g, int b) { }
Color c = Color with {
r = 100;
g = 50;
b = 200;
}
Color derived = c with { r = 75; }
- Jos Angel George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-comments/attachments/20240327/b07cb1c6/attachment.htm>
More information about the amber-spec-comments
mailing list