On each object, only the toString
method exists. (Inherited from Java.) This may or may not lead to analysis. In most common cases, this probably will not; there is no real agreement for this, as in Python, but some of the collection classes at least try. (Until they are endless.)
The point where it breaks is, of course, already reached when the lines are involved.
"some string".toString == "some string"
however, for a proper presentation it would be necessary
repr("some string") == "\"some string\""
As far as I know, there is no such thing in Scala. However, some of the serialization libraries may be useful for this.
source share