Scala client composition with Traits vs implementing an abstract class
I don’t know what your source is for the claim that you should prefer traits over abstract classes in Scala, but there are several reasons not to: Traits complicate Java compatibility. If you have a trait with a companion object, calling methods on the companion object from Java requires bizarre MyType$.MODULE$.myMethod syntax. This isn’t the … Read more