Scope for JEP 468: Derived record creation
Swaranga Sarma
sarma.swaranga at gmail.com
Thu Feb 29 21:34:18 UTC 2024
The JEP looks really promising. However I am wondering if there will be a
separate JEP for creating new records from scratch with similar syntax.
The current JEP states that its goals are to enable creating records from
an existing record and for that it seems sufficient. But I would also love
to be able to create new records from scratch using the same syntax.
Something like:
var circle = new Circle with {
radius = 0.5f;
center = new Center with {
x = 0;
y = -1;
z = 8;
};
};
Originally I had asked Brian Goetz about record literals and they seemed
like a possibility but withers seem like a more general feature so I am
hoping something like this would be supported in the future.
Regards
Swaranga Sarma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20240229/f4aff2d2/attachment.htm>
More information about the amber-dev
mailing list