3 ms·
Things to consider here are: - operator precedence - implicit type casting - how operator+ is defined per each type (e.g: numbers add, strings concatenate)
by partycoder 9y ago
Things to consider here are:
- operator precedence
- implicit type casting
- how operator+ is defined per each type (e.g: numbers add, strings concatenate)
- Seol 9y agoThe interesting thing is that the "obvious correct" behaviour would require the precedence of the + operator to depend on the types of the operands - which is obviously impossible if it's done at the parse stage...