I would image it was to circumvent the problem with different types e.g.:
"hello" + 2
If you can’t have overloaded operators, you know the type of c
in
c = a + b
to always be a Number
, where, if you could use +
for both Number
s and String
s you wouldn’t know the type of c
before evaluating the expression.
You might also run into a problem with precedence. What is the result of:
"hello" + 10 + 20