3 ms·
The claim was that there is not operator precedence in J and that the result is "totally avoid ambiguity at all". But that's just not so. The / in `+/%#` total
by patrec 5y ago
The claim was that there is not operator precedence in J and that the result is "totally avoid ambiguity at all". But that's just not so. The / in `+/%#` totally is an operator, and could also have a user defined name. It does not have the same precedence as +, % and # and you can't parse the expression without knowing that beforehand. You also need to understand "trains". In fact you need two parses, because there are two essentially unrelated meanings of the expression and there is no context to disambiguate if it is monadic or dyadic.
- rak1507 5y agoFair point. The equivalent of regular 'operators' +-*/&|etc in J are verbs, and restricting yourself only to verbs, there is no precedence and it is unambiguous, but with operators, it does get a bit more tricky.