What do all Scala's symbolic operators mean?

In this tutorial, we will learn about the symbolic operators with their usage in Scala. By Shivang Yadav Last updated : April 02, 2023

What are Symbolic Operators in Scala?

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.

Types of Scala Symbolic Operators

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,

'=', '(_+_)'





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.