Terrence wrote:
> It seems that the Residue function should follow
> the same argument order as %
>
> What motivated this decision?
Roger responded:
> A dyad x f y in J is defined so that x&f is a
> more sensible function than f&y ...
In other words: Remember your "asymmetry" thread?
Roger Hui:
http://www.jsoftware.com/pipermail/general/2007-April/029638.html
verbs in J (and APL) are designed so that fixing
the left argument makes a sensible monad.
Henry Rich:
http://www.jsoftware.com/pipermail/general/2007-April/029633.html
The idea is, if you were going to be applying this verb a
bunch of times, which operand would be more likely to stay
the same?
John Randall:
http://www.jsoftware.com/pipermail/general/2007-April/029667.html
On these grounds, ! is the wrong way round: you are more
likely to calculate x ! y for fixed y than
fixed x. On the other hand, | is the correct way round.
Randy MacDonald
http://www.jsoftware.com/pipermail/general/2007-April/029671.html
the (really informal) convention that J and
APL clauses (noun verb noun) follow the structure of
control verb data.
Me:
http://www.jsoftware.com/pipermail/general/2007-April/029654.html
Since J executes verbs from right to left, it is sensible to design
verbs such that their right arguments are the ones most likely to be
calculated (not known in advance). This avoids excessive
parenthesization or commutation.
http://www.jsoftware.com/pipermail/general/2007-April/029659.html
Because J is right-to-left, a primitive P should be designed to make:
x P y =. thing I'm likely to calculate
more likely than
y P ~ x =. thing I'm likely to calculate
or
(x =. thing I'm likely to calculate) P y
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm