无需回头使用显式的(和冗长的)条件块,而是用规则定义自动处理问题。
Rather than revert back to explicit (and lengthy) conditional blocks, the rule definitions take care of matters automatically.
该规则说明告诉您,显式静态构造函数会导致代码性能变差。
The rule description tells you that an explicit static constructor results in code that performs worse.
这里有一份关于scala何时需要显式类型注解规则的总结。
Here is a summary of the rules for when explicit type annotations are required in Scala.
应用推荐