<html class="apple-mail-supports-explicit-dark-mode">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
I invite you to think about how such a thing might be implemented, and what arrays are for, and the question sort of answers itself.   
<div><br>
</div>
<div>The built-in patterns are about unpacking: recovering type information, unpacking records into their components, unpacking arrays into their contents.  Asking whether an array contains exactly these elements, or even asking that question about a prefix
 of the elements, is an unpacking.  Searching an array, as would be required by a wild card in the beginning or middle, is valid things to want to do, but it’s not unpacking.  (And the cost model would be deceptive.)</div>
<div><br>
</div>
<div>Arrays are a low level, built-in feature of the language, not a database to be queried.  <br>
<div><br id="lineBreakAtBeginningOfSignature">
<div dir="ltr">Sent from my iPad</div>
<div dir="ltr"><br>
<blockquote type="cite">On Feb 3, 2026, at 1:01 AM, David Alayachew <davidalayachew@gmail.com> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-family:monospace">Hello <a class="gmail_plusreply" id="plusReplyChip-1" href="mailto:amber-dev@openjdk.org" tabindex="-1">@amber-dev</a>,</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">I was a little surprised that I didn't notice this until now, but when re-reading Brian's <a href="https://mail.openjdk.org/pipermail/amber-spec-observers/2022-September/003635.html">Array Patterns write-up</a>,
 I realized that my brain auto-completed something that wasn't actually there.</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">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?</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">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.</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">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?</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">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.</div>
<div class="gmail_default" style="font-family:monospace"><br>
</div>
<div class="gmail_default" style="font-family:monospace">Thank you for your time and help.</div>
<div class="gmail_default" style="font-family:monospace">David Alayachew</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>