Because the Java language required all interface members to be public and the original designers didn't want to force the "methods" of java.io.Serializable
to be public, this was not possible in Java.
Scala doesn't have this restriction, but things like readObject
/writeObject
are still not specified in the scala.Serializable
trait.
Wouldn't this help developers because
- they had a guarantee that their signature is correct
- it would make accessing these methods less akward.
or do I miss something important?