最佳答案
我一直很好奇在 Scala 中没有一个显式的主构造函数,只有类主体的内容的影响。
In particular, I suspect that the private or protected constructor pattern, that is, controlling construction through the companion object or another class or object's methods might not have an obvious implementation.
我错了吗? 如果错了,怎么做到的?