3 ms·
Does Scala have that?
by therealdrag0 4y ago
Does Scala have that?
- erik_seaberg 4y agoScala has sealed traits, which may only be implemented in the same file, and pattern matching must be exhaustive. At a glance, Java 17 has something similar (JEP 409 sealed classes).