Swift Language Operators are Functions


Example

Operators such as +, -, ?? are a kind of function named using symbols rather than letters. They are invoked differently from functions:

  • Prefix: -x
  • Infix: x + y
  • Postfix: x++

You can read more about basic operators and advanced operators in The Swift Programming Language.