|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] A couple of bugs, and a question on the power operator |
Date: | Sat, 13 Aug 2016 14:05:18 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi Louis, a quick answer to your question beforehand, I will look into the bugs later. GNU APL has implemented the power operator according to the description in the book "Mastering Dyalog APL". The ISO standard says nothing about this operator, it is simply not defined there. In "Mastering Dyalog APL" I haven't found the monadic case for the right function argument G of the power operator. In that book G seems to be always dyadic. So the monadic case looks like a new Dyalog invention. And, if it is defined like you say, IMHO not the ultimate wisdom. What I do not like at all is the fact that in the dyadic case F is being computed before G (it has to, because you need the result ⍺F⍵ or F⍵ as left argument of G. And, as you say, in the monadic case F is being computed after G. I could imagine to implement the monadic G if it were always computed after F so that the order of execution is consistent for the monadic and dyadic cases. But if Dyalog really has different orders then I would prefer to not implement the monadic case in GNU APL at all because then I would only have the choice between an inconsistent execution order (which is, in my opinion, bad) or an incompatibility with Dyalog APL (which is also bad). Actually in GNU APL lambdas can be ambivalent, but monadic functions (lambda or not) cannot be ambivalent. Localizing variables assigned in lambdas automatically is technically possible but would break backward compatibility of existing workspaces. There was a discussion on this topic earlier this year, but no progress lately. I was thinking of some ⎕-function (like ⎕FX but with {} syntax that would allow you to created lambdas with more control over the localization of variables). BTW, I read the word until in your description below as F being called before G and not after G, even in the monadic case. /// Jürgen On 08/13/2016 08:24 AM, Louis de
Forcrand wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |