<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-dev" <amber-dev@openjdk.org><br><b>Sent: </b>Thursday, January 26, 2023 10:48:47 AM<br><b>Subject: </b>Draft JEP on 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 style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt;">Hello all,</span></div>
<div style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt;"><br></span></div>
<div style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt;">I would like to share this draft JEP with you about primitive types in patterns, instanceof, and switch:</span></div>
<div style="font-family: "Segoe UI", "Segoe UI ", "Helvetica Neue", sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">https://openjdk.org/jeps/8288476</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">"Enhance pattern matching by allowing primitive types to appear anywhere in patterns. Extend instanceof to support primitive types, and extend switch to allow primitive constants as case labels."</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0">Comments very much welcomed!</div>
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0">Many thanks,</div>
<div class="ContentPasted0">Angelos</div>
<br>
</div></blockquote><div><br></div><div>I still think that the semantics proposed for pattern matching on primitive types is useless complexity with the perverse side effect of normalizing the usage of "default" in pattern matching (too many examples of this JEP are using "default") but we already discussed that.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Allowing switching on double and float constants is just wrong.</div><div>Rust is actually trying to remove that feature<br></div><div>  <a href="https://github.com/rust-lang/rust/issues/41255">https://github.com/rust-lang/rust/issues/41255</a><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I see no point to make the same mistake.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Otherwise, the rest is fine.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>RĂ©mi<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></div></body></html>