neeraj wrote:So what happens to right to left execution?
APL was never entirely "right to left". For example, in the expression (2+3)×4-6 the order of execution is:
4-6
2+3
(2+3)×(4-6)
Even without parens, it wasn’t entirely “right-to-left”: +/3+⍳4 is evaluated (+/)(3+(⍳4)) and not +(/(3+(⍳4)). A better summary of APL syntax is:
- Operators are executed before functions.
- The left argument of an operator is the entire function phrase which precedes it.
- The right argument of a function is the entire array phrase which follows it.
- A function is applied dyadically if possible.
- A parenthesized expression must be completely evaluated before its result can be used.
A more complete and formal description can be found in
http://dfns.dyalog.com/n_parse.htm or (coming soon) [Hui and Kromberg 2020].
The treatment of /⌿\⍀ differs between dialects. The implementation of Dyalog APL started in 1982 and version 1.0 released in 1983-04, before information about APL2 became publicly available. Backward compatibility is axiomatic with Dyalog APL and so it was not and is not possible to change the definition. The difference is regrettable but kind of minor.