#pattern-matching

[ follow ]
fromOracle
1 week ago

The Arrival of Java 25

New in this release JDK 25 delivers sixteen enhancements that are significant enough to warrant their own JDK Enhancement Proposal (JEP), including four preview features, one experimental feature, and one incubator feature. These features cover innovations to the Java language to the libraries (with two improvements specifically to security libraries), performance and runtime, and monitoring improvements. Language Innovation Primitive Types in Patterns, instanceof, and switch 3rd Preview
Software development
Java
fromInfoQ
2 weeks ago

OpenJDK News Roundup: Vector API, Ahead-of-Time Object Caching, Prepare to Make Final Mean Final

Six JEPs advanced for JDK 26—three targeted and three proposed—while the proposed JDK 26 release schedule was finalized.
fromjsdevspace.substack.com
2 weeks ago

JavaScript Just Leveled Up: ES2025 - You'll Fall in Love With

Tired of endless conditionals? Pattern matching transforms branching logic into declarative expressions. Old approach: function handleResponse(response) { if (response.status === 200 && response.data) { return response.data; } else if (response.status === 401) { throw new Error('Unauthorized'); } else if (response.status === 404) { throw new Error('Not Found'); } else if (response.status >= 500) { throw new Error('Server Error'); } else { throw new Error('Unknown Error'); } } New ES2025 magic: function handleResponse(response) { return match (response) { when ({ status: 200, data }) -> data when ({ status: 401 }) -> throw new Error('Unauthorized') when ({ status: 404 }) -> throw new Error('Not Found') when ({ status: s if s >= 500 }) -> throw new Error('Server Error') default -> throw new Error('Unknown Error') }; } It's concise, readable, and surprisingly powerful like switch statements on steroids.
JavaScript
Software development
fromHackernoon
5 years ago

Comparing Pattern-Matching Across Different Languages: Java, Scala, and More | HackerNoon

Pattern matching in Java enhances conditional logic and code clarity, especially in evaluating different object types.
Cooking
fromMedium
4 months ago

Unlocking SQL LIKE, IN, and Wildcards: Filter Data Like a Pro

Mastering SQL LIKE, wildcards, and IN operator enables effective pattern matching and multi-value filtering in database queries.
Java
fromInfoWorld
4 months ago

What you need to know about Java wrapper classes

Wrapper classes bridge the gap between primitive types and objects, essential for modern Java features.
[ Load more ]