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
Login to reply
Replies (1)
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.