----- Original Message ----- > From: "daniel smith" <[email protected]> > To: "Remi Forax" <[email protected]> > Cc: "Brian Goetz" <[email protected]>, "Gavin Bierman" > <[email protected]>, "amber-spec-experts" > <[email protected]> > Sent: Thursday, October 27, 2022 11:51:23 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
>> On Oct 22, 2022, at 2:52 PM, [email protected] wrote: >> >> 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. > > Maybe I'm missing something, but doesn't it do this already? yes, but with the proposed semantics, it's not possible to extract the record instance AND have the length of the record component list checked. Either i can use case Point p -> or case Point(var x, var y) -> but this is not valid anymore case Point(var x, var y) p -> ... Rémi
