2 ms·
All infix notations (without sufficient parentheses) require an agreement (implicit or explicit) among all concerned parties. This is nothing new. The same ambi
by baddox 15y ago
All infix notations (without sufficient parentheses) require an agreement (implicit or explicit) among all concerned parties. This is nothing new. The same ambiguity occurs with the unary negation operator, as in -5^2.
While I wouldn't choose it, I don't think it's entirely unreasonable to give the "multiplication by juxtaposition" operator greater precedence than the normal multiplication and division operators.
- uiri 15y agoIf you write the expression as a fraction without anything beside it being multiplied, it is ambiguous as to whether (1+2) ought to go above or below the fraction bar. The fact that parentheses/brackets ought to be resolved before anything else complicates things because 6/2 * 3 could reasonably be interpreted either way. An unambiguous way to write it would be either as (6/2) * 3 or as 6/(2*3).