3 ms·
I'm really curious how this will influence the implementation of value classes and opaque types in Scala. I do hope that this will lead to a more efficient enco
by esarbe 5y ago
I'm really curious how this will influence the implementation of value classes and opaque types in Scala. I do hope that this will lead to a more efficient encoding, although I wonder how this would be possible without breaking backward compatibility.
- kaba0 5y agoI am not too knowledgable about Scala, but I think they only promise source-compatibility, so they are free to swap out the resulting binary to a more efficient implementation if the semantics are correct. Hopefully they did anticipate JVM-native value classes.
- boroboro4 5y agoI don't think it will affect opaque types implementation at all, since they exist only in compile time. As for value classes - Valhalla is a reason (Scala's) value classes weren't removed from Scala 3 (in favor of opaque types), since they seem to be a good candidate to be implemented using Valhalla's classes.