Because semicolons, function return types, method arguments lists, and even the curly braces are sometimes omitted, using an equals sign prevents several possible parsing ambiguities.
因为分号,函数返回类型,方法参数列表,甚至大括号都经常会被省略,使用等于号可以避免几种可能的二义性。使用等于号也提醒了我们,即使是函数,在Scala里面也是值。
It has been omitted in Listing 2, so the last line of the function will be returned.
清单2忽略了这个关键字,因此函数的最后一行将被返回。
Thirdly, when prepositional phrases denote the shared knowledge and a general location, they can be omitted, no matter they function as attributes or adverbials in sentences.
第三,介词短语表示共同享有的知识以及泛指地点时,无论其在句中充当定语还是状语,往往皆可省略。
应用推荐