In Scala, how can I subclass a Java class with multiple constructors?
It’s easy to forget that a trait may extend a class. If you use a trait, you can postpone the decision of which constructor to call, like this: trait Extended extends Base { … } object Extended { def apply(arg1: Int) = new Base(arg1) with Extended def apply(arg2: String) = new Base(arg2) with Extended def … Read more