What different between
scala.collection.immutable.List$SerializationProxy
and
scala.collection.immutable.List
in Scala 2.11 ?
What different between
scala.collection.immutable.List$SerializationProxy
and
scala.collection.immutable.List
in Scala 2.11 ?
List$SerializationProxy
is a helper class that is used by List
to implement the Serialization Proxy Pattern
You can see some discussion about this in the source code, List.scala:415
// Create a proxy for Java serialization that allows us to avoid mutation
// during deserialization. This is the Serialization Proxy Pattern.
protected final def writeReplace(): AnyRef = new List.SerializationProxy(this)
You do not need to use or interact with List$SerializationProxy
as a normal user of Scala, it is an implementation detail.