bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Feature suggestion: multiple function arguments


From: Alexey Veretennikov
Subject: Re: [Bug-apl] Feature suggestion: multiple function arguments
Date: Mon, 14 Mar 2016 20:03:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (darwin)

Hi,

Dyalog APL returned exactly this:

      1 (+//) 1 2 3 4
1 2 3 4



Juergen Sauermann <address@hidden> writes:

> 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) fork
>
>
>
> I'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
>
>

-- 
Br,
/Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]