<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unnamed-Patterns on Devops Monk</title><link>https://devops-monk.com/tags/unnamed-patterns/</link><description>Recent content in Unnamed-Patterns on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 04 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/unnamed-patterns/index.xml" rel="self" type="application/rss+xml"/><item><title>Unnamed Patterns and Variables (JEP 443): Writing Intent-Clear Code</title><link>https://devops-monk.com/tutorials/java21/unnamed-patterns/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/java21/unnamed-patterns/</guid><description>Preview Feature — Requires --enable-preview at compile and runtime. The _ identifier was reserved in Java 9; this JEP gives it formal semantics.
The Problem: Forced Naming of Unused Things When pattern matching, you often care about only some components of a matched structure. But the syntax forces you to name everything:
record Point(int x, int y) {} record ColoredPoint(Point point, String color) {} record Box(ColoredPoint cp, int weight) {} // You only care about the color — but must name everything else if (obj instanceof Box(ColoredPoint(Point(int x, int y), String color), int weight)) { System.</description></item></channel></rss>