2 ms·
I'm excited about this not because I'd use them in Java, but because JVM support for value types could make the case classes I'm using in Scala much more effici
by lmm 13y ago
I'm excited about this not because I'd use them in Java, but because JVM support for value types could make the case classes I'm using in Scala much more efficient.
- pron 13y agoThat depends. Value types don't support polymorphism and subclassing. More specifically, you can't have an array of a union value type like you would in C. Could case classes do without polymorphism?
- kasey_junk 13y agoCase classes as they currently stand cannot do without polymorphism. That said the Scala team doesn't show a lot of hesitancy in adding new features so I wouldn't be surprised if they implemented case value classes of some sort once the JVM supports them natively.