<div dir="auto"><div>Hello Stephen,</div><div dir="auto"><br></div><div dir="auto">I already gave my thoughts on your Reddit post [1], so I'll avoid duplicating them here.</div><div dir="auto"><br></div><div dir="auto">All I'll add is that you should CC Valhalla Dev as well. Not only are you explicitly naming value types as part of your reasoning, but the recent Valhalla videos that came out seem to mention (in passing) some of the things you are concerned about.</div><div dir="auto"><br></div><div dir="auto">Thank you for your time.</div><div dir="auto">David Alayachew</div><div dir="auto"><br></div><div dir="auto">[1] = <a href="https://old.reddit.com/r/java/comments/1o747zu/type_conversion_in_java_an_alternative_proposal/njlech1/">https://old.reddit.com/r/java/comments/1o747zu/type_conversion_in_java_an_alternative_proposal/njlech1/</a><br><br><div class="gmail_quote gmail_quote_container" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Oct 15, 2025, 2:35 AM Stephen Colebourne <<a href="mailto:scolebourne@joda.org">scolebourne@joda.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In the vein of JEP feedback, I believe it makes sense to support<br>
primitive types in pattern matching, and will make sense to support<br>
value types in the future. And I can see the great work that has been<br>
done so far to enable this.<br>
<br>
Unfortunately, I hate the proposed syntactic approach in JEP 507. It<br>
wasn't really clear to me as to *why* I hated the syntax until I had<br>
enough time to really think through what Java does in the area of<br>
primitive type casts, and why extending that as-is to pattern matching<br>
would IMO be a huge mistake.<br>
<br>
(Please note that I fully grasp the pedagogical approach wrt<br>
instanceof defending an unsafe cast, but no matter how much it is<br>
repeated, I don't buy it, and I don't believe it is good enough by<br>
itself.)<br>
<br>
To capture my thoughts, I've written up how Java's current approach to<br>
casts leads me to an alternative proposal - type conversion casts, and<br>
type conversion patterns:<br>
<a href="https://tinyurl.com/typeconvertjava1" rel="noreferrer noreferrer" target="_blank">https://tinyurl.com/typeconvertjava1</a><br>
<br>
thanks<br>
Stephen<br>
</blockquote></div></div></div>