24 Java Features You Missed In 2022 - Inside Java Newscast #39#videoJDK 18 and JDK 19 preview a number of big ticket features but they also come with a lot of smaller improvements. Here are 24 less-known features that were added to Java in 2022. Among them additions to
HashMap, Security and GC improvements, Custom Localized Date-Time Formats and an Internet Address Resolution SPI, and much more.
Data-Oriented Programming in Java (20)#talkData-oriented programming models data as data: records for entities and sealed types for alternatives. Combined with pattern matching we can define operations on the data without overloading it with functionality.
Data-Oriented Programming - Inside Java Newscast #29#videoData-oriented programming focuses on modeling data as data (instead of as objects). Records for data and sealed types for alternatives let us model immutable data where illegal states are unrepresentable. Combined with pattern matching we get a safe, powerful, and maintainable approach to ad-hoc polymorphism that lets us define operations on the data without overloading it with functionality.
Deconstructing Records in Pattern Matching - Inside Java Newscast #26#videoHow record patterns use records' transparency to safely deconstruct them in pattern matching, allowing us to separate checking structure and value of data from processing it.
News Grab Bag: Loom Virtual Threads, Lilliput, Pattern Matching, ... - Inside Java Newscast #25#videoProject Loom's virtual threads are merged and ship with JDK 19 - here's to prepare for them. Also, news on Project Lilliput, proposal for record patterns in pattern matching, some astonishing numbers from Sonatype on Maven Central, and the move of OpenJDK to openjdk.org.
JEP 427 proposes two changes to pattern matching in switch: 1. Guarded patterns, which belonged to patterns, are replaced with when clauses, which belong to the case. 2. null needs to be handled by a specific case null.
nullIn Pattern Matching - Inside Java Newscast #24#video
How To UseSince Java 14 introduced switch expressions, using
switchIn Modern Java#post
switchisn't as straight-forward as it used to be: colons or arrows, statement or expression, labels or patterns? Here's how to best use
switchin modern Java.
All About JDK 18 - Inside Java Newscast #21#videoRefinements in pattern matching and Panama's foreign and vector APIs; a new command
jwebserverand a new IP address resolution SPI; preparing code for UTF-8 becoming the default character set and for the eventual removal of finalization; and a few more bits and pieces.
State of Pattern Matching with Brian Goetz#videoConversation with Project Amber lead Brian Goetz about pattern matching in Java: Why
Map::getshould be a pattern, the linear thinking trap and how it impacts null handling in pattern matched, exhaustiveness in switch statements and the rehabilitation of
11 Tricks From dev.java - Inside Java Newscast #14#videoFrom compact record constructors to boolean expressions in pattern matching, from generic wildcards to chaining predicates and comparators, from jpackage to jlink - here are 11 Java tricks handpicked from dev.java.
Incremental Evolution, Pattern Switches vs Visitor Pattern, and Wayland Support - Inside Java Newscast #8#videoHow the six-month release cadence enabled a more incremental evolution of the Java platform and how pattern switches and sealed classes are an alternative to the visitor pattern. Also, maybe Wayland support for Java.
Visitor Pattern Considered Pointless - Use Pattern Switches Instead#postIn modern Java, the visitor pattern is no longer needed. Using sealed types and switches with pattern matching achieves the same goals with less code and less complexity.
Pattern Matching in Switches and Security Manager Deprecation - Inside Java Newscast #5#videoJEP 406, which is a candidate for Java 17, introduced pattern matching in
switchstatements and expressions, introduces guarded patterns, and improves null handling. Then we need to talk about JEP 411's deprecation of the security manager.
Patterns,Project Amber brings new patterns and puts them into
switch, and Valhalla's Primitive Classes - JDK News #2#video
switchwhile Project Valhalla takes off and proposes introducing primitive classes
Type Pattern Matching withType patters with
instanceofare Java's first step towards pattern matching. Motivation, syntax, details, and future applications - here's all you need to know.
Pattern Matching in Java#postJava takes its first steps towards pattern matching but the topic is much larger than
instanceof. Goals, terminology, flow scoping - these apply to all kinds of patterns.
Pattern Matching Quartet - JDK News #1#videoA summary of four recent discussions about pattern matching on the Project Amber mailing lists