scala运算符
Scala的符号运算符 (Scala's symbolic operators)
Thesymbolic operators in Scalaare symbols that have a specifictask that they perform when called in a Scala program.Scala library defines a lot of symbolsthat can be usedwhile programmingin Scala.
Scala中的符号运算符是具有在Scala程序中调用的特定任务的符号。 Scala库定义了许多在Scala中编程时可以使用的符号。
Here is a list of all validScala symbolic operators,you cango to ourtutorial on Scala operators to get a deep knowledge of operators used in Scala programming language.
这是所有有效的Scala符号运算符的列表,您可以转到我们的Scala运算符教程,以深入了解Scala编程语言中使用的运算符。
There are fourtypes of symbolsare used in Scala:
Scala使用四种符号类型:
1) Keywords/ reserved symbols
1)关键字/保留符号
There are symbols in Scala programming language that have a specific utilization and are reserved for that.
Scala编程语言中有一些具有特定用途的符号,并且为此保留了这些符号。
Keywords: '' , '=>'
关键字:'','=>'
Reserved symbols: '(' , ')' , '[' , ']', '{', '}', '.', '// /* */' , '#' , ':' , '<:>: <%' , '' , ''' ""', ''', '@' , ',', ';', '_*', '_'
保留符号:'(',')','[',']','{','}','。','// / * * /','#',':','<:>:<%''''''“””,''','@',',',';','_ *','_'
2) Automatically import methods
2)自动导入方式
The default imports are,
默认导入为
import _root._java.lang._
导入_root._java.lang._
import _root._scala._
导入_root._scala._
import _root._scala._Predef._
导入_root._scala._Predef._
ArrowAssoc : ->
ArrowAssoc:->
3) Common methods
3)常用方法
These are those symbols that are methods to some classes,
这些符号是某些类的方法,
'++', '.++', '.::', '+:',
'++','。++','。::','+:',
4) Syntactic sugars/ compositions
4)语法糖/成分
These are those symbols that may hide a method,
这些是可能隐藏方法的符号,
'=', '(_+_)'
'=','(_ + _)'
翻译自: /scala/what-do-all-scala-symbolic-operators-mean.aspx
scala运算符
如果觉得《scala运算符_Scala的所有符号运算符是什么意思?》对你有帮助,请点赞、收藏,并留下你的观点哦!