<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Angelos Bimpoudis" <angelos.bimpoudis@oracle.com><br><b>To: </b>"amber-spec-experts" <amber-spec-experts@openjdk.org><br><b>Sent: </b>Wednesday, April 2, 2025 4:51:59 PM<br><b>Subject: </b>Draft JEP for Third Preview of Primitive Types in Patterns, instanceof, and switch<br></blockquote></div><div><style style="display:none;"> P {margin-top:0;margin-bottom:0;} </style></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">


<div class="elementToProof" style="line-height: 18px; font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Dear experts,</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
A draft JEP for the third preview of primitive types in patterns, instanceof,</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
and switch is now available and submitted. We propose to preview it for a third</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
time with no changes relative to JDK 24.</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
https://openjdk.org/jeps/8349215  </div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
To recall, this feature drops restrictions around switch and instanceof. During</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
the evolution of this feature we established new terminology and functionality</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
to safeguard against loss of information or other exceptional cases across all</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
types, uniformly. One of the goals of this feature is to not introduce new</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
conversions, rather to safeguard against all existing ones. Re-previewing as is</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
for the third time gives us the opportunity to examine Chapter 5 of the JLS</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
holistically and identify opportunities that could pave the road to other</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
potential language features, e.g., constant patterns, null-restricted value</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
class types etc.</div></blockquote><div><br></div><div>There is another dependency, in Valhalla, at some point we will want to "merge" primiitive types and values types, primitive types becoming a subset of value types.</div><div>There are nice ideas floating around, but as far as i know, that part is not fully fledged, <br></div><div>so if we move too quickly here, the primitive type patterns of today may become a problem of tomorrow.</div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thank you,</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Angelos</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
</blockquote><div><br></div><div>regards,</div><div>RĂ©mi</div><div><br data-mce-bogus="1"></div></div></div></body></html>