Scala regards a method with the equals sign before the body as a function definition and a function always returns a value in functional programming.
Scala把主体之前的部分包含等于号作为函数定义,而一个函数在函数式编程中永远都有返回值。
Note that for the single sign-on authentication to properly work, you must include a call to the authorizeCallback() method in your onActivityResult() function.
注意,为了单点登录身份认证正确工作,您必须在 onActivityResult() 函数中包含一个对 authorizeCallback() 方法的调用。
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里面也是值。
应用推荐