Draft JEP: Derived Record Creation (Preview)
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Thu Jan 25 12:41:57 UTC 2024
Looking from another angle, I think an important distinction between
creation and _derived_ creation is that in the latter case you have some
"fallback" values to use if the `with` block doesn't specify transforms
for all of them. In the plain creation case, since the object did not
exist before, there is nothing to fall back to - other than the default
value of course, which might be a surprising/lousy choice in some cases.
So perhaps the similarity between these two cases is more superficial
than it looks.
Maurizio
On 24/01/2024 20:19, Remi Forax wrote:
> And as a general remarks, I hope there will be a following JEP about
> record instance creation that allows to use the syntax of a
> transformation block to initialize a record.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20240125/af1a27c3/attachment-0001.htm>
More information about the amber-spec-experts
mailing list