Draft Spec for Fourth Preview of Pattern Matching for Switch (JEP 433) and Second Preview of Record Patterns (JEP 432) now available
forax at univ-mlv.fr
forax at univ-mlv.fr
Sat Oct 22 21:52:06 UTC 2022
> From: "Brian Goetz" <brian.goetz at oracle.com>
> To: "Remi Forax" <forax at univ-mlv.fr>, "Gavin Bierman" <gavin.bierman at oracle.com>
> Cc: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> Sent: Saturday, October 22, 2022 4:28:50 PM
> Subject: Re: Draft Spec for Fourth Preview of Pattern Matching for Switch (JEP
> 433) and Second Preview of Record Patterns (JEP 432) now available
> What exactly do you mean by this?
If i modify a record by adding a new component, i want to compiler to help me to find all the switches that are using that record so i can re-evaulate if the new component play a role or not for each of those codes.
Then for each code, i can say, i do not care about that new component by adding an any pattern or i care about it, add a binding and change/fix the code using that binding.
That a power that the record pattern has over the type pattern, a type pattern does not check if the record has changed since the code was written.
Rémi
> On 10/22/2022 2:09 AM, Remi Forax wrote:
>> Still very disappointed that i can not express that i want the compiler to not
>> compile a switch if a record has a new record component.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-observers/attachments/20221022/1d93f28b/attachment.htm>
More information about the amber-spec-observers
mailing list