Skip to main content

Usage

Addition and subtraction are the simplest operators. They act just as you’d use them writing math on paper:
# Addition
1 + 1

# Subtraction
4 - 2
10 - 20

# Bare
7
2

# Bare signed
+14 
-29

# imagine bare signed as having a zero before the sign that's invisible
0 + 14
0 - 29
# the runtime processes it this way internally

Exceptions

As we’ll see later, the summation and subtraction operation will behave different according to the types of the elements on both sides (e.g. it’s not the same the addition of two numbers than the addition of two vectors).