<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
I see.<br>
<br>
No, I wouldn't want to see a global change like this. In new code
(or code that it being significantly changed), it is fine to use new
language features like pattern-matching switch statements. We've
already done this in some cases. However, I wouldn't want to see a
wholesale modification of existing code just for the sake of
modernizing that code.<br>
<br>
Worth noting, there is a PR under review to add a section to the JDK
dev guide that addresses this point, stating that refactoring
changes in stable code are discouraged. See
<a class="moz-txt-link-freetext" href="https://github.com/openjdk/guide/pull/101">https://github.com/openjdk/guide/pull/101</a><br>
<br>
-- Kevin<br>
<br>
<br>
<div class="moz-cite-prefix">On 4/22/2023 7:13 AM, Thiago Milczarek
Sayão wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAAP_wukiq2EFBdjzMOpayqjA3weT1h85L6vj+OAXpo38Q1CdFA@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div>Sure, I meant something like:</div>
<div>
<div style="background-color:rgb(30,31,34);color:rgb(206,208,214);font-family:"JetBrains
Mono",monospace">
<pre><span style="color:rgb(116,157,237)">if </span>(<span style="color:rgb(114,207,214)">owner </span>!= <span style="color:rgb(116,157,237)">null </span>&& <span style="color:rgb(114,207,214)">owner </span><span style="color:rgb(116,157,237)">instanceof </span>WindowStage) {
((WindowStage) <span style="color:rgb(114,207,214)">owner</span>).<span style="color:rgb(222,188,126)">setEnabled</span>(<span style="color:rgb(116,157,237)">true</span>);
}
</pre>
</div>
</div>
</div>
<div>To:<br>
</div>
<div>
<div style="background-color:rgb(30,31,34);color:rgb(206,208,214);font-family:"JetBrains
Mono",monospace">
<pre><span style="color:rgb(116,157,237)">if </span>(<span style="color:rgb(114,207,214)">owner </span><span style="color:rgb(116,157,237)">instanceof </span>WindowStage <span style="color:rgb(177,137,245)">windowStage</span>) {
<span style="color:rgb(177,137,245)">windowStage</span>.<span style="color:rgb(222,188,126)">setEnabled</span>(<span style="color:rgb(116,157,237)">true</span>);
}</pre>
</div>
</div>
<div><br>
</div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Em sáb., 22 de abr. de 2023
às 11:09, Kevin Rushforth <<a href="mailto:kevin.rushforth@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">kevin.rushforth@oracle.com</a>>
escreveu:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">The minimum JDK version
is 17, so JavaFX cannot use any features that <br>
are only available in a later JDK. Further, we cannot use
any preview <br>
features.<br>
<br>
-- Kevin<br>
<br>
<br>
On 4/22/2023 6:59 AM, Thiago Milczarek Sayão wrote:<br>
> Hi,<br>
><br>
> Can I submit PR for pattern matching or enhanced
switches?<br>
><br>
> I was thinking about creating an umbrella project like
"Adopt new <br>
> language features from project amber" and submit "per
module" and "per <br>
> feature" PRs.<br>
><br>
> -- Cheers<br>
<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>