Matej Cerny's avatar
Matej Cerny 2 months ago
1️⃣ JEP 409 (Sealed Classes) standardizes sealed hierarchies, a feature Scala pioneered. This allows the Scala compiler to emit native sealed bytecode, enabling safer consumption from Java (via exhaustive switch checks) and letting Scala natively match Java's/Kotlin's sealed types

Replies (1)

Matej Cerny's avatar
Matej Cerny 2 months ago
2️⃣ JEP 441 (Pattern Matching for switch) adds new bytecode for pattern matching. These new JVM-level instructions can be potentially used in Scala's own match expressions, making them even more efficient.