Proposed to target JDK 27: JEP 532: Primitive Types in Patterns, instanceof, and switch (Fifth Preview): https://openjdk.org/jeps/532 #jdk27 #openjdk #java

@openjdk

Instanceof on a primitive type will now be possible, and it will do a range check? Neat!

#Rust did something similar a few years ago when they introduced the TryFrom trait.

#Java #programming