Re: Pattern matching: next steps after JEP 405

2022-05-20 Thread Brian Goetz
You are right that varargs records are dancing on the edge of a cliff.  But (a) we have varargs records, and (b) array/varargs patterns are not only for records. If you're arguing that they are not essential *right now* and can be deferred, that's a reasonable argument, but you'd have to

Re: Pattern matching: next steps after JEP 405

2022-05-20 Thread Brian Goetz
I'm sorry, I have no idea what argument you are trying to make.  Start from the beginning. On 5/20/2022 1:27 AM, fo...@univ-mlv.fr wrote: *From: *"Brian Goetz" *To: *"Remi Forax" *Cc:

Re: Collections patterns

2022-05-20 Thread Brian Goetz
Or maybe you mean something else; if so, please share! The current proposal is more about matching and extracting the first arguments It is really about matching *the whole array*.   Pattern matching is about destructuring.  Arrays are part of the language.  They have structure.  We

Re: Pattern matching: next steps after JEP 405

2022-05-20 Thread Remi Forax
> From: "Brian Goetz" > To: "amber-spec-experts" > Sent: Wednesday, May 18, 2022 9:18:01 PM > Subject: Pattern matching: next steps after JEP 405 > JEP 405 has been proposed to target for 19. But, it has some loose ends that > I'd > like to refine before it eventually becomes a final feature.

Re: Collections patterns

2022-05-20 Thread forax
> From: "Brian Goetz" > To: "Remi Forax" > Cc: "amber-spec-experts" > Sent: Thursday, May 19, 2022 3:03:55 PM > Subject: Re: Collections patterns >> We may want to extract sub-parts of the array / collections by example, and i >> would prefer to have the same semantics and a similar syntax. >