x***4 发帖数: 1815 | |
p*****2 发帖数: 21240 | 2 肯定
【在 x***4 的大作中提到】 : 数目很多,而且容易看错。谁能归纳一下方便学习?
|
c******o 发帖数: 1277 | 3 most of them are NOT operator, very little operator in Scala, most are just
functions for certain type |
z****e 发帖数: 54598 | 4 也就是给某个特定领域用的
定义各种方法,然后某个特定领域的人一看
诶,名字很熟悉,就会用了
比较突出的例子就是统计等数学领域
just
【在 c******o 的大作中提到】 : most of them are NOT operator, very little operator in Scala, most are just : functions for certain type
|
c******o 发帖数: 1277 | 5 What I mean is
for example, Scala List:
++
++:
+:
/:
:+
::
:::
:\
they are not operators, they just functions. You can wrap them in another
name easily if you really want.
Scala has very few operators. |
l*********s 发帖数: 5409 | 6 operator和method到底啥区别?
【在 c******o 的大作中提到】 : What I mean is : for example, Scala List: : ++ : ++: : +: : /: : :+ : :: : ::: : :\
|
c******o 发帖数: 1277 | 7 operator 是语言spec的,没法改
function是code里的,可以override/wrap/添加 |
x***4 发帖数: 1815 | 8 抱歉一下: 我的意思是指那些像operator的method。比如说setter是 var_=(xyz)。
【在 c******o 的大作中提到】 : operator 是语言spec的,没法改 : function是code里的,可以override/wrap/添加
|
B*****g 发帖数: 34098 | 9 就这个::和:::一直没搞清楚,哈哈
【在 c******o 的大作中提到】 : What I mean is : for example, Scala List: : ++ : ++: : +: : /: : :+ : :: : ::: : :\
|