|
From: | Dr . Jürgen Sauermann |
Subject: | Re: [Bug-apl] A few problems |
Date: | Tue, 5 Feb 2019 18:08:24 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 02/04/2019 09:13 PM, vvs wrote:
To me this looks like an undesirable side effect of a parser optimizationOn Mon, Feb 4, 2019 at 2:04 PM Dr. Jürgen Sauermann <address@hidden> wrote:Attempting to solve a not decidable problem at runtime is nothing that I would dare to try.Well, it seems that it all depends on implementation. While Dyalog implemented assignment the same way as GNU APL, in NARS2000 it's very different: all assignments are always treated as variables even if function with the same name exists. I've tried this: ∇A [1] A←0 ∇ )FNS A )VARS A←1 A 1 )FNS )VARS A (you can collapse 2 Token Z and ← into a single Token Z← instead of parsing 2 Token at runtime). But one can easily construct examples where the results are different. It also raises the following question: ∇Z←A Z←42 ∇ A←5 A What is A and why so? And its is definitely not ISO which says (page 67): ... If V is a variable-name, If the current-class of V is nil or variable, Set the current-referent of V to a token whose class is variable and whose content is the content of B. Return a token whose class is committed-value and whose content is B. Otherwise, signal syntax-error. /// Jürgen |
[Prev in Thread] | Current Thread | [Next in Thread] |