Talk:Defined function (traditional)

From APL Wiki
Jump to navigation Jump to search

Terminology

After some serious consideration, I've decided it's probably better for the APL Wiki to use the more general terms "defined function" and "anonymous function" rather than "tradfn" and "dfn" when not referring to a specific dyalect. At the moment I think dfns should retain their own page but tradfn should just be renamed; it could be separated out later. The distinguishing feature of a tradfn is not its traditionalness (that's not a feature), but the fact that it is defined using a special syntax. In contrast, a dfn is not really defined: it is written using dfn notation, then assigned a name. In the same way we wouldn't say that array notation "defines" an array, only that it "describes" or "encodes" one. This has come up a few times when writing pages on APL syntax: I want to say that a name is given a value by assignment or function definition, and it's strange then to have "function definition" redirect to Tradfn.

Iverson used the term "direct definition" to refer to a kind of defined function (e.g. [1]), but in NARS it's a kind of anonymous function, and I think the anonymous functions in A Programming Language and J are also sometimes called "direct definition". I think the latter sense uses a somewhat different meaning of "define", as in "to define a shape [function]" rather than "to define a word [identifier]" (it also seems to mangle "direct", since NARS goes from source code to string to function, while tradfns and dfns just go from source code to function). Since direct definition is not used in mainstream APLs, I think it is better to sidestep these issues by dumping all this usage into a Direct definition page with a few sections rather than trying to force it onto the defined and anonymous function pages. --Marshall (talk) 09:42, 13 May 2020 (UTC)