|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Feature suggestion: multiple function arguments |
Date: | Mon, 14 Mar 2016 14:03:05 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi Kacper, yes. The tricky case is when it cannot be decided if g is an operator or not. Consider this: 1 (+//) 1 2 3 4 1 2 3 4 We get the same result in GNU APL and IBM APL2. No idea what Dyalog APL returns in this case. The +// can then be interpreted in two different ways: a) function-plus operator-reduce operator-reduce b) function-plus function-compress function-compress Of course one could resolve this by deciding for either a) or b). But: if we go for b) then we introduce an incompatibility with IBM APL2, and if we go for a) then we have a syntax with exceptions for / \ ⍀ and ⌿. I consider both options as really really bad and not worth the effort for implementing them. /// Jürgen On 03/13/2016 07:35 PM, Kacper Gutowski
wrote:
On Sun, Mar 13, 2016 at 6:20 PM, Juergen Sauermann <address@hidden> wrote:it actually does create conflicts. In IBM APL2 and in GNU APL, the _expression_ ⍺ (f g h) ⍵ gives a 3 item vector with the items being ⍺, (f g h), and ⍵. In Dyalog APL it gives (quote): (⍺ f ⍵) g (⍺ h ⍵) ⍝ dyadic (fgh) forkI'm not certain whether it does create conflicts or not in general, but I think this particular example is flawed: ⍺ (f g h) ⍵ could be anything depending on what name classes those symbols have (particularly if g were an operator). When f, g, and h are all functions, then it's not a vector, but a syntax error. No conflict here. -k |
[Prev in Thread] | Current Thread | [Next in Thread] |