APL\360

Chuck Guzis cclist at sydex.com
Fri Jan 29 11:12:29 CST 2021


On 1/29/21 6:27 AM, Paul Koning via cctalk wrote:

> True, although right to left is not a natural way to read mathematical formulas.  The reason APL uses right to left is that the designers apparently were unwilling to change the direction of the assignment operator, so everything else had to follow.  Another language that doesn't have precedence avoided this issue by changing assignment to match the others, i.e., everything is left to right.  That is POP-2, a language out of the U of Edinborough I remember from an AI class.  So it would do stuff like:
> 
> 	a + 1 * 5 -> b
> 
> which in C would be
> 
> 	b = (a + 1) * 5;
> 
> and is definitely easier to read than the APL equivalent.

Well, part of the confusion lies in the difference of "=" in mathematics
indicating a property or state, as opposed to computer languages using
it as an operator. It's a subtle distinction, but important.

D = 4AC in mathematics establishes a property of D, whereas
D = 4*A*C in BASIC, etc. means "multiply 4 by A, then take that result
and multiply it by the value of C and store the result into D.

APL treats the assignment as what it is--an operation.   Why the RTL of
APL was chosen by Iverson, is a mystery; I agree.  He was, as far as I
know, not  native writer of Hebrew.  I suppose we should be grateful
that he didn't specify APL as a boustrophedon.

We already have Forth.

--Chuck



More information about the cctech mailing list