On Wed, Feb 6, 2019 at 4:10 PM Dr. Jürgen Sauermann <mail@jürgen-sauermann.de> wrote: > Certainly not: > > ∇Z←A > Z←42 > ∇ > > At this point A has token class Niladic-Defined-Function-Name (page 25), An > attempt to > change that by: > > A←5 > > is therefore explicitly forbidden by the statement on page 67. It has always > bin that way since > the invention of APL. You need to )ERASE A (or → if A was localized) before > you can change it
I don't see any mention of this in ISO standard or any textbooks. Where exactly is said that parsing should always use token class when binding names? I'm again quoting ISO where it explicitly said that tokens could change their class during parsing: "Informal Description: Bind-token-class is used to bind each identifier in current- statement to its current syntactic-unit; if the class of a token changes between this point and the time the token is used (as it would for example in F ⎕EX'F' , assuming F were initially a defined-function), the change will be detected and reported as a syntax-error in the appropriate phrase-evaluator." I understand wordings in ISO such that as parsing should always be done based on syntax alone and only evaluation of already parsed expressions should consult their classes. In that context A is clearly a variable-name and only during binding it should be signaled that changing its class is a syntax-error. Otherwise evaluating syntactically incorrect statements will surely lead to unpredictable behavior.