[Top][All Lists]

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

Re: [Bug-apl] Local variables in lambdas

From: Juergen Sauermann
Subject: Re: [Bug-apl] Local variables in lambdas
Date: Tue, 16 Aug 2016 16:42:15 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi again,

done, SVN 786.

// Jürgen

On 08/16/2016 11:28 AM, Juergen Sauermann wrote:

thank you all for your comments.

It seems like the winner is this syntax (example):


The proposal to replace { } by [ ] would create an ambiguous syntax:

      (1 2 3) [⍺+⍵] 4
2 4
      (1 2 3) {⍺+⍵} 4
5 6 7

and changing to something else would at least affect existing workspaces.

To declare the global variables instead of the local ones would create an
unnecessary incompatibility between lambdas and proper defined functions.
It would also cause problems in cases like this:

      { ⍎⍵,'←0';C;D} ¨ 'ABCD'

because then A and B would be local and C and D global, but the lambda
cannot know its local variables at the point in time where it needs to push
its local variables.

/// Jürgen

reply via email to

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