Scala - what is the benefit of Auxiliary constructors always having to call another constructor?
问题 Coming from the Java world, I don't see how the restrictions on the auxiliary constructors in Scala are helpful .. In Java, I know we can have multiple constructors as long as their signatures are different. In Scala, the first call in an auxiliary constructor needs to be another auxiliary constructor or the class's primary constructor. Why? Doesn't this make Scala more restrictive? 回答1: Scala essentially guarantees that the primary constructor will always be called, so it gives a single