<story><title>A compact overview of JDK 21’s “frozen” feature list</title><url>https://vived.io/a-compact-overview-of-jdk-21s-frozen-feature-list-jvm-weekly-vol-138/</url></story><parent_chain></parent_chain><comment><author>neonate</author><text>&lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;web.archive.org&amp;#x2F;web&amp;#x2F;20230611150725&amp;#x2F;https:&amp;#x2F;&amp;#x2F;vived.io&amp;#x2F;a-compact-overview-of-jdk-21s-frozen-feature-list-jvm-weekly-vol-138&amp;#x2F;&quot; rel=&quot;nofollow noreferrer&quot;&gt;http:&amp;#x2F;&amp;#x2F;web.archive.org&amp;#x2F;web&amp;#x2F;20230611150725&amp;#x2F;https:&amp;#x2F;&amp;#x2F;vived.io&amp;#x2F;a...&lt;/a&gt;</text></comment>
<story><title>A compact overview of JDK 21’s “frozen” feature list</title><url>https://vived.io/a-compact-overview-of-jdk-21s-frozen-feature-list-jvm-weekly-vol-138/</url></story><parent_chain></parent_chain><comment><author>gavinray</author><text>I wrote about how Record Patterns along with Pattern Matching for Switch can be used to write things like Tree-Rewrite rules in AST analyzers&amp;#x2F;program optimizers efficiently if anyone is curious:&lt;p&gt;This is how Spark&amp;#x27;s optimizer Catalyst works in Scala&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;gavinray97.github.io&amp;#x2F;blog&amp;#x2F;what-good-are-record-patterns&quot; rel=&quot;nofollow noreferrer&quot;&gt;https:&amp;#x2F;&amp;#x2F;gavinray97.github.io&amp;#x2F;blog&amp;#x2F;what-good-are-record-patte...&lt;/a&gt;&lt;p&gt;Kind of wild to believe this is valid modern Java:&lt;p&gt;&lt;pre&gt;&lt;code&gt;        return switch (expr) {
            &amp;#x2F;&amp;#x2F; x + 0 = x
            case Add(Var(var name), Const(var value)) when value == 0 -&amp;gt; new Var(name);
&lt;/code&gt;&lt;/pre&gt;
These two are my favorite new JDK features by miles, along with Sealed Types.</text></comment>