> I've often thought * before +, which is now 
> taught as 'standard', comes mostly from the 
> first Fortran which did use that order.

On this topic, Falkoff and Iverson had this to 
say on page 326 of "The Design of APL".
http://www.research.ibm.com/journal/rd/174/ibmrd1704F.pdf

The rule that multiplication is executed before
addition and that the power function is executed
before multiplication has been long accepted in
mathematics.  In discarding any established rule
it is wise to speculate on the reasons for its
adoption and on whether they still apply.  This
rule makes parentheses unnecessary in the writing
of polynomials, and this alone appears to be a
sufficient reason for its original adoption.
However, in APL a polynomial can be written more
perspicuously in the form +/C*X^E [translated
from APL to J], which also requires no parentheses.

> The only one I still have trouble with is the 
> left argument in dyadic transpose, which differs 
> in J and APL.

Dyadic transpose in J is far easier than in APL.  
x|:y moves axes x to the tail end, and axes to be
run together are boxed together.  With dyadic 
transpose in APL I it always takes me at least two
tries when the left argument x is a permutation: 
first x, then the inverse permutation of x. 
Even more tries are needed when the left argument 
is not a permutation (i.e. when axes are to be 
run together).



----- Original Message -----
From: Ralph G Selfridge <[EMAIL PROTECTED]>
Date: Thursday, May 24, 2007 7:51 am
Subject: Re: [Jgeneral] Why does the Residue function take its arguments in 
"reverse" order

> I take a somewhat more pragmatic approach.
> 
> Years ago when teaching APL the first, and largest problem, was to 
> stop 
> students writing poor C in even worse APL. We learn the notation 
> as it is, 
> not from some pre-set ordering; and this true in mathematics. Why 
> should 
> a*b+c mean * first? (and in many cases it doesn't). I've often 
> thought * 
> before +, which is now taught as 'standard', comes mostly from the 
> first 
> Fortran which did use that order. Spoken languages do not, in general,
> have a nice logical structure in all cases.
> 
> Mathematical notation has grown over the years, sometimes in ways 
> I expect 
> sometimes not. J has changed since the first release was made 
> years ago.
> 
> But I want the simplicity of the notation, so I learn it as it is. 
> The only 
> one I still have trouble with is the left argument in dyadic 
> transpose, 
> which differs in J and APL. When all else fails I just experiment 
> on a low 
> rank noun until I get what I want.
> 
> I can provide arguments in most cases for what is actually done, 
> but I'm 
> not sure it matters, nor do I think it makes the learning easier.
> 
> Ralph Selfridge
> 
> 
> On Wed, 23 May 2007, Roger Hui wrote:
> 
> > This time I do remember, having re-read it only
> > earlier today.  Quoting from
> > http://www.jsoftware.com/pipermail/general/2007-April/029638.html
> >
> > http://www.jsoftware.com/help/jforc/more_verbs.htm
> > comments on the order of arguments in /: and \: .
> > In these cases the answer is "obvious".  With
> > the current order of arguments,
> >     /: y       \: y
> >   x /: y     x \: y
> > it is always the right argument which is being
> > graded.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to