File:APL_(programming_language)_logo.svg · Wikimedia Commons · See Wikimedia Commons
Also known as APL language, A Programming Language, Array Processing Language, APL programming language, APL\360, APL (language), A programming language, APL programming language family
via Wikipedia infobox

~40 min read
APL (named after the book A Programming Language) is a programming language developed in the 1960s by Kenneth E. Iverson. Its central datatype is the multidimensional array. It uses a large range of special graphic symbols to represent most functions and operators, leading to very concise code. It has been an important influence on the development of concept modeling, spreadsheets, functional programming, and computer math packages. It has also inspired several other programming languages.
History
functional, symbolic programming language for operating on multidimensional arrays
The APL Programming Language Source Code - CHM
Thousands of programming languages were invented in the first 50 years of the age of computing. Many of them were similar, and many followed a traditional, evolutionary path from their predecessors. But some revolutionary languages had a slant that differentiated them from their more general-purpose brethren. LISP was for list processing. SNOBOL was for string manipulation. SIMSCRIPT was for simulation. And APL was for mathematics, with an emphasis on array processing. What eventually became APL was first invented by Harvard professor Kenneth E. Iverson in 1957 as a mathematical notation, not as a computer programming language. Although other matrix-oriented symbol systems existed, including the concise tensor notation invented by Einstein, they were oriented more towards mathematical analysis and less towards synthesis of algorithms. Iverson, who was a student of Howard Aiken’s, taught what became known as “Iverson Notation” to his Harvard students to explain algorithms. The team, of course, soon saw that the notation could be turned into a language for programming computers. That language, which was called APL starting in 1966, emphasized array manipulation and used unconventional symbols. It was like no other computer program language that had been invented. APL became popular when IBM introduced “APL 360” for their System/360 mainframe computer. Unlike most other languages at the time, APL 360 was also a complete interactive programming environment. The programmer, sitting at an electromechanical typewriter linked to a timeshared computer, could type APL statements and get an immediate response. Programs could be defined, debugged, run, and saved on a computer that was simultaneously being used by dozens of other people. With the permission of IBM, the Computer History Museum is pleased to make available the source code to the 1969-1972 “XM6” version of APL for the System/360 for non-commercial use. Jürgen Winkelmann at ETH Zürich has done an amazing job of turning this source code into a runnable system. For more information, see MVT for APL Version 2.00 . Iverson’s book “A Programming Language” 1 uses a graphical notation that would have been difficult to directly use as a programming language for computers. He considered it an extension of matrix algebra, and used common mathematical typographic conventions like subscripts, superscripts, and distinctions based on the weight or font of characters. Here, for example, is a program for sorting numbers: To linearize the notation for use as a computer programming language typed at a keyboard, the APL implementers certainly had to give up the use of labeled arrows for control transfers. But one feature that they were able to retain, to some extent, was the use of special symbols for primitive functions, as illustrated in this program that creates Huffman codes: APL uses symbols that are closer to standard mathematics than programming. For example, the symbol for division is ÷, not /. To support the unconventional symbols, APL 360 used a custom-designed keyboard with special symbols in the upper case. Even so, there were more special characters than could fit on the keyboard, so some were typed by overstriking two characters. For example, the “grade up” character ⍋, a primitive operator used for sorting, was created by typing ∆ (shift H), then backspace, then ∣ (shift M). There was no room left for both upper- and lower-case letters, so APL supported only capital letters. For printing programs, Iverson and Falkoff got IBM to design a special type ball for their 1050 and 2741 terminals, which used the IBM Selectric typewriter mechanism. Now programs could be both typed in and printed. Here, for example, is the printed version a program from the APL Language manual 2 that computes the mathematical determinant of a matrix: Order of evaluation: Expressions in APL are evaluated right-to-left, and there is no hierarchy of function precedence. For example, typing the expr
Excerpt from a page describing this subject · 35,784 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).