|
From: | Louis de Forcrand |
Subject: | Re: [Bug-apl] jot dot jot dot? |
Date: | Tue, 28 Jun 2016 17:26:47 +0200 |
Operators are evaluated from left to right in Dyalog, NARS2000, and J at least. This seems logical: +/{each} should parse as (+/){each}, not +(/{each}), and +/{rank}1 as (+/){rank}1, as "tacit" operators aren't supported in GNU APL or the standard (/{each} and /{rank}1 have no meaning). The problem is that jot dot is not a usual operator since it is written to the left of its argument. I believe this is because it was originally perceived as similar to an inner product, but with no reduction, and jot was the "null function" (this comes from the original APL book). Inner products were written with the first function on top of the second, but to adapt this to terminals, a dot was instead placed between the two functions. Thus °| became º.| I would imagine jot dot should parse just like and inner product, except when the jot is read, an outer product is executed. So, as I see it (with * as times), °.°.* should parse as (°.°).*, just as +.*.* should parse as (+.*).* . However, I don't see what (°.°) corresponds to. It seems to me that APL2 parses it as °.(°.*) , in which case APL2 has some operators with a long left scope and others with a long right scope. Then you encounter problems such as °.*/; is that °.(*/) or (°.*)/ ? My point is that I am almost sure that functions have a long right scope, and operators a long left scope; the exception here is jot dot, and I don't know what it has. To illustrate what Iverson thought, in J x (jot dot fun) y is written as x (fun/) y . Louis Sorry for the poor formatting!
|
[Prev in Thread] | Current Thread | [Next in Thread] |