Arithmetic Operators in Parentheses-Less Languages

In languages where a function call doesn’t require parentheses, the binary arithmetic operators pose an interesting problem. Most obviously, the issue can be seen when considering negation

a - 2

Does it mean a minus 2 or a(-2)? Surprisingly, CoffeeScript allows a plus to precede a number, and handles both plus and minus the same way:

a + 2 # denotes a plus 2
a +2 # surprise: a(+2), so: a(2), or: a 2 in CoffeeScript
a+2 # a plus 2 again
a+ 2 # obviously, a plus 2

Spaces do make a difference!