Simplifying switch labels

2022-06-01 Thread Dan Smith
I recently reviewed the spec changes for patterns in switch, and found the treatment of switch labels pretty hard to work out. Since this is really about the design more than the specification, I thought I'd share some thoughts here. Consider this early feedback on the Java 19 preview. The

Re: Named record pattern

2022-06-01 Thread Brian Goetz
For me, there is a difference between a binding and a local variable, is that bindings are the one declared inside a pattern and a local variables is how a binding is transformed to be usable inside the boby if the pattern match. Our first (wrong) inclination was to treat pattern variables

Re: Named record pattern

2022-06-01 Thread Remi Forax
> From: "Brian Goetz" > To: "Tagir Valeev" > Cc: "amber-spec-experts" > Sent: Tuesday, May 31, 2022 6:12:06 PM > Subject: Re: Named record pattern > Gavin reminded me that we are not finalizing patterns in switch in 19 (hard to > keep track, sometimes), so we have a little bit of time to