Home »
Scala language
What do all Scala's symbolic operators mean?
Scala symbolic operators: In Scala, there are a lot of symbolic operators that are defined for the proper functioning of the system. In this tutorial, we will see the basics of symbolic operators in Scala.
Submitted by Shivang Yadav, on August 07, 2019
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.
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.
There are four types of symbols are used in Scala:
1) Keywords/ reserved symbols
There are symbols in Scala programming language that have a specific utilization and are reserved for that.
- Keywords: '<-' , '=>'
- Reserved symbols: '(' , ')' , '[' , ']', '{', '}', '.', '// /* */' , '#' , ':' , '<: >: <% ' , '' , ' '' "" ', ' ' ', '@' , ',', ';', '_*', '_'
2) Automatically import methods
The default imports are,
- import _root._java.lang._
- import _root._scala._
- import _root._scala._Predef._
- ArrowAssoc : ->
3) Common methods
These are those symbols that are methods to some classes,
'++', '.++', '.::', '+:',
4) Syntactic sugars/ compositions
These are those symbols that may hide a method,
'=', '(_+_)'