Question about Array Patterns

David Alayachew davidalayachew at gmail.com
Tue Feb 3 00:00:50 UTC 2026


Hello @amber-dev <amber-dev at openjdk.org>,

I was a little surprised that I didn't notice this until now, but when
re-reading Brian's Array Patterns write-up
<https://mail.openjdk.org/pipermail/amber-spec-observers/2022-September/003635.html>,
I realized that my brain auto-completed something that wasn't actually
there.

In the write-up, there is only the concept of a prefix match or an exact
match. But what about a suffix match? Or a "somewhere-in-the-center" match?

The original proposal for Array Patterns (that preceded this one) had the
"..." syntax, which I mentally auto-completed to be "0 or more elements".
Maybe that was a mistake on my part too.

Anyways, could I get some clarification? Is that intentionally unspecified
for now, pending further thought? Or is that something that will be handled
else where?

And by all means, what is there, I like. It's just that the message calls
itself Array Patterns, so my thought is that it would cover all the
possible types of matches one might want to do on an array.

Thank you for your time and help.
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20260202/cc7a5a9d/attachment.htm>


More information about the amber-dev mailing list