scala-notes
  • Introduction
  • functional programming
  • Compiling Running Program
  • Tuples
  • Collections
    • Maps
  • Control Structures
    • For Loop
    • Case
    • WhileDoWhile
  • Functions
    • Named Functions
    • [Function Values]Using Functions as Variables
    • Syntax
    • Notes
  • Scala Symbols
  • REPL Editor Notes
    • Paste Mode
  • Statically Typed
  • References
  • Classes
    • Primary Constructor
    • Getters And Setters
    • Variations
  • Java vs Scala
    • Classes - Primary Constructor
    • Scala Syntax
  • Ways To Run program
  • functional programming
Powered by GitBook
On this page

Was this helpful?

Scala Symbols

PreviousNotesNextREPL Editor Notes

Last updated 5 years ago

Was this helpful?

We can divide the operators in Scala, for the purpose of teaching, into four categories:

  • Keywords/reserved symbols

  • Normal methods or values

  • Methods provided by implicit conversion

  • Syntactic sugars/composition

And let’s see some arbitrary examples:

The exact meaning of most of these methods depends on the class they are defined on. For example, <= on Int means “less than or equal to”, but it might mean something else in another class. :: in an expression is probably the method of the class List but it can also refer to the object of the same name (and in a pattern it definitely does).

So, let’s discuss these categories.

Keywords/reserved symbols

https://docs.scala-lang.org/tutorials/FAQ/finding-symbols.html