Dyalog lambdas aren’t that different from GNU ones AFAIK. Minor differences
include
use of the statement separator in Dyalog’s, which can be circumvented with stop,
and local / global variables (disregarding multi-lines and case statements,
etc).
Nested lambdas can be used in GNU APL as well.
Mo
⍴t
4 5
t
1 12 20 19 5
6 2 14 3 16
17 11 7 9 4
15 10 18 13 8
⍴{2⍴⍵}⍤0 t
4 5 2
⍴{1⍴⍵}⍤0 t
4 5 1
⍴{0⍴⍵}⍤0 t
4 5 1
⍝ something wrong above, should be a 4x5x0 matrix
⍴{⍴⍵}⍤0 t
4 5 1
⍝ something wrong above, should be a 4x5x0 matrix
I've been following the lambda discussion with some interest, and would like to
propose yet another alternative for your consideration.
In brief, let's eliminate possible confusion with Dyalog's lambda
implementation by adopting a syntax which clearly differentiates GNU APL's
lambdas from Dyalo
> On Aug 14, 2016, at 8:16 PM, Louis de Forcrand wrote:
>
> Yes, the first seems more appropriate and readable. However, I would argue
> that the variables
> in that list should be the ones to be made global; for me it is easier to
> forget that an argument is
> global rather than forget that
The first one looks more appealing because it is close to the normal
function declaration syntax.
Sincerely,
Grant Rettke
On Sun, Aug 14, 2016 at 2:50 PM, Juergen Sauermann
wrote:
> Hi,
>
> Thinking about lambdas once more I had an idea of a syntax for declaring
> local variables in
> the lambd
Yes, the first seems more appropriate and readable. However, I would argue that
the variables
in that list should be the ones to be made global; for me it is easier to
forget that an argument is
global rather than forget that it is local.
In addition, I believe that this would be more compatible
I also prefer the first one. Since execution is from right to left (in general)
declaration of
local variables *before* using them make more sense to me.
Xtian.
On 2016-08-14 15:50, Juergen Sauermann wrote:
Hi,
Thinking about lambdas once more I had an idea of a syntax for declaring local
v
I agree that the first one is more like the usual function definition.
Like in UI design’s “principle of least astonishment”, the more familiar a
thing looks, the better.
https://en.wikipedia.org/wiki/Principle_of_least_astonishment
> On Aug 14, 2016, at 15:50, Juergen Sauermann
> wrote:
>
>
Hi,
Thinking about lambdas once more I had an idea of a syntax for
declaring local variables in
the lambda. In order to bring lambdas and proper functions closer
together rather than separating
them more than necessary, we could use the same syntax as
Hi,
my argument in this case would not be the limited size of ⎕AV
but a concern regarding portability.
In the past some APLs (and also J) have tried to improve APL.
IMHO most of these attempts have failed because they provide very
minor
Hi Louis,
thanks, now I see what you meant. Fixed in SVN 784.
/// Jürgen
On 08/14/2016 07:19 AM, Louis de
Forcrand wrote:
About the axis error: I’m pretty sure that what you’re getting
isn’t entirely corr
Hi Alex,
you could use ⎕FIO to write information about how far you came in the
script into a separate
file for debugging purposes.
I haven't seen your code, but from the error text I would assume that
either you haven't provided,
the CGI header, or the DOMAIN ERROR occurred before the CGI hea
Hi Kacper,
thanks, I see. If I read your examples correctly then Dyalog has a
special syntax {A} to mark the left argument A
of a defined function as optional and, as a consequence, to
declare a function as ambivalent.
In GNU APL (and I believe
13 matches
Mail list logo