博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
scala运算符_Scala的所有符号运算符是什么意思?
阅读量:2529 次
发布时间:2019-05-11

本文共 1668 字,大约阅读时间需要 5 分钟。

scala运算符

Scala的符号运算符 (Scala's symbolic operators)

The symbolic operators in Scala are symbols that have a specific task that they perform when called in a Scala program. Scala library defines a lot of symbols that can be used while programming in Scala.

Scala中的符号运算符是具有在Scala程序中调用的特定任务的符号。 Scala库定义了许多在Scala中编程时可以使用的符号。

Here is a list of all valid Scala symbolic operators, you can go to our tutorial on Scala operators to get a deep knowledge of operators used in Scala programming language.

这是所有有效的Scala符号运算符的列表,您可以转到我们的Scala运算符教程,以深入了解Scala编程语言中使用的运算符。

There are four types of symbols are 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运算符

转载地址:http://fytzd.baihongyu.com/

你可能感兴趣的文章
《代码大全》学习摘要(五)软件构建中的设计(下)
查看>>
C#检测驱动是否安装的问题
查看>>
web-4. 装饰页面的图像
查看>>
微信测试账户
查看>>
Android ListView上拉获取下一页
查看>>
算法练习题
查看>>
学习使用Django一 安装虚拟环境
查看>>
Hibernate视频学习笔记(8)Lazy策略
查看>>
CSS3 结构性伪类选择器(1)
查看>>
IOS 杂笔-14(被人遗忘的owner)
查看>>
自动测试用工具
查看>>
前端基础之BOM和DOM
查看>>
[T-ARA/筷子兄弟][Little Apple]
查看>>
编译Libgdiplus遇到的问题
查看>>
【NOIP 模拟赛】Evensgn 剪树枝 树形dp
查看>>
java学习笔记④MySql数据库--01/02 database table 数据的增删改
查看>>
两台电脑如何实现共享文件
查看>>
组合模式Composite
查看>>
程序员最想得到的十大证件,你最想得到哪个?
查看>>
我的第一篇CBBLOGS博客
查看>>