java - Why does `ScalaObject` exist? -


Why does all scala sections get obtained from ScalaObject , although this feature is completely empty And there is no view in it?) Compared to AnyRef , which defines additional methods?

This method will not be as slow as a call like equals () or hash code () because it should take into consideration the second class (which Ways to override)?

Is it possible to multiply AnyRef and ScalaObject in a class?

Update: With ScalaObject Scala's new version 2.10.

scalabject a $ tag method , In which, according to the comment, "Pattern matching is necessary to adapt expressions that match the builders of the case classes." Since the name starts with $ , the program programmer should be considered as "hidden". In Scala 2.8, it is completely empty, so I think it is for backward compatibility.


Comments