<<   >>

A History of APL in 50 Functions

Roger K.W. Hui

We believe that the design of APL was also affected in important respects by a number of procedures and circumstances. Firstly, from its inception APL has been developed by using it in a succession of areas. This emphasis on application clearly favors practicality and simplicity. The treatment of many different areas fostered generalization …
— Falkoff and Iverson, The Design of APL, 1973 [0a]
The mathematician’s patterns, like the painter’s or the poet’s must be beautiful; the ideas like the colours or the words, must fit together in a harmonious way. Beauty is the first test: there is no permanent place in the world for ugly mathematics.
— G.H. Hardy, A Mathematician’s Apology, 1940 [1]
Such were the vagaries of what may have been the most powerful computer language ever hatched by a Canadian. Yes, I know that James Gosling, an alumnus of the University of Calgary, was the “father of Java.” He and I have talked about it. And yes, there is a now a game called “Perl Golf” in which you try to do the most work in that scripting language with the fewest number of (key-) strokes. Java and Perl are good and useful and popular, but APL was … beautiful.
— Tom Keenan, Business Edge, 2004 [2]

•         •         •         •         •         •         •

APL will be 50 years old in November 2016 (50 years from 1966-11-27 22.53.58 UTC, to be exact), and it remains unsurpassed in manifesting Kenneth E. Iverson’s five important characteristics of notation [3]:

  • ease of expression
  • suggestivity
  • subordination of detail
  • economy
  • amenability to proof

Herewith, in the best traditions of “A History of x in 50/100 y”,



and in honor and in celebration of the 50-th anniversary of APL, these characteristics are demonstrated through 50 APL functions. They span the 50 year history of APL. The first sixteen are updated and expanded versions of what appeared in Sixteen APL Amuse-Bouches [4]. A different subset of them was presented as A Tour (de Force) of APL in 16 Expressions [5, 6]. Many of the others are translations of ideas which germinated in the J dialect [7].

The APL functions require the environment specified in The Fine Print.