Quote:

>What was the logic behind expression evaluation going from right to left?

>What is the advantage of this?

Emmett McLean mentioned mechanics of parsing in response.

There is an original design answer:

In mathematics and most computer languages, assignment flows to the left:

the name on the left gets everything to the right. If you permit

operations to perform on results of other operations, then as you pass

results from one operation to another operation in the same line, you're

effectively assigning arguments to each new operation. Thus if you keep

assignment as right to left, performing a statement of progressive

assignments goes right to left.

APL was originally designed as a mathematical notation, to standardize

certain varying mathematical notation practices. Mathematics and other

computer languages use the confusing multi-directional practice of left

to right evaluation in general, function precedence for right to left and

left to right in the same phrase, and right to left for assignment. APL

cleans up this practice by just choosing one direction, following the

flow of progressive assignments. This also has benefits of eliminating

precedence and many parentheses. Precendence would be pretty silly for

50+ primitives.

/

Charles A. Schulz