3 ms·
This is just untrue. You can't even parse J without knowing if something is an "adverb" or a "verb".
by patrec 5y ago
This is just untrue. You can't even parse J without knowing if something is an "adverb" or a "verb".
- abrudz 5y agoBut the modern APL, BQN lets you directly see the syntax from the symbol or name: https://mlochbaum.github.io/BQN/doc/context.html#bqns-spelling-system https://mlochbaum.github.io/BQN/doc/context.html#bqns-spelli...
- patrec 5y agoThanks that's interesting! They however kept what I consider J/APL's main syntactic misfeature, overloading the meaning of every symbol in pretty arbitrary ways depending on whether it is called with one or two arguments. E.g. *: x " x squared y *: x " NAND of x and y At least it made it to the Problems with BQN page ;) https://mlochbaum.github.io/BQN/commentary/problems.html#incoherent-monad-dyad-builtin-pairs https://mlochbaum.github.io/BQN/commentary/problems.html#inc...
- rak1507 5y agoThat has nothing to do with RTL 'operator' precedence. Ok, sure, there's some other precedence stuff in J, but the actual thing that was the topic of this post is not related to it.
- patrec 5y agoThe 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.