然而,对于所有的方法参数来说,类型注解是必须的。
However, type annotations are required for all method parameters.
这里有一份关于scala何时需要显式类型注解规则的总结。
Here is a summary of the rules for when explicit type annotations are required in Scala.
所以,scala比haskell这样的语言需要更多的类型注解。
So, Scala requires more type annotations than languages like Haskell.
应用推荐