2,954
edits
m (Text replacement - "direct definition (NARS)" to "direct definition (operator)") |
(Function definition) |
||
Line 24: | Line 24: | ||
| <syntaxhighlight lang=apl inline>⊃</syntaxhighlight> || Configurable || [[Dyalog APL]], [[APL*PLUS]], [[APL+Win]], [[APL64]] | | <syntaxhighlight lang=apl inline>⊃</syntaxhighlight> || Configurable || [[Dyalog APL]], [[APL*PLUS]], [[APL+Win]], [[APL64]] | ||
|} | |} | ||
== Function definition == | |||
{{Main|Function styles}} | |||
Dialects offer a variety of ways to create [[function]]s and [[operator]]s. The three major branches are [[defined function]]s, which use a header declaring the function and argument names, [[anonymous function]]s such as [[dfn]]s, which also consist of a list of statements but have no header and use fixed argument names, and [[tacit programming|tacit function]]s, which are created by manipulating existing functions with no reference to [[argument]]s. | |||
Defined functions were the dominant form for most of APL's history, with only some niche forms based on [[direct definition (notation)|direct definition notation]] appearing in the 1980s: the [[direct definition (operator)|direct definition operator]] in [[NARS]] and a library to translate this notation to defined functions in [[SHARP APL]]. Function assignment, a necessary feature for tacit programming, began to appear in the 1980s, such as in [[Dyalog APL]] version 4.0 in 1986. However, [[train]]s, which make larger-scale tacit programming feasible, were not introduced to APL until around 2010. Dyalog's [[dfn]]s were introduced in 1996 to slow initial adoption; nearly all new dialects of the 2010s and later support a similar syntax. Because of the widespread use of dfns, several of these dialects no longer support a traditional function definition notation. | |||
== Numeric types == | == Numeric types == |