APL
APL (A Programming Language) is an array-oriented programming language designed by Kenneth E. Iverson, distinguished by its use of a compact set of special mathematical symbols to express operations over entire arrays and vectors in…
Definition
APL (A Programming Language) is an array-oriented programming language designed by Kenneth E. Iverson, distinguished by its use of a compact set of special mathematical symbols to express operations over entire arrays and vectors in extremely concise notation.
Overview
APL originated as a mathematical notation, not initially a programming language: Kenneth E. Iverson developed it in the late 1950s and early 1960s at Harvard, and later at IBM, as a way to describe algorithms and mathematical procedures more precisely and compactly than conventional notation, publishing it in his 1962 book 'A Programming Language,' from which the language takes its name. It was later implemented as an actual executable programming language at IBM in the mid-1960s, requiring a distinctive keyboard and character set to type its many special symbols — glyphs for operations like outer product, matrix inverse, grade-up/grade-down sorting, and array reshaping, most of which have no equivalent single symbol in mainstream languages. APL's defining paradigm is array-oriented (sometimes called 'array programming'): operations that would require explicit loops in most languages — summing a column, transposing a matrix, filtering elements meeting a condition — are instead expressed as single symbolic operators applied to whole arrays at once, without explicit iteration. This gives APL programs a famously terse, dense visual style where a single line can express what might take many lines of loop-based code elsewhere, a property enthusiasts value for expressing complex mathematical and data-transformation logic close to how a mathematician would think about it, and critics have long characterized as 'write-only' code that is difficult to read. Iverson received the ACM Turing Award in 1979 for his contributions to programming language design and array-oriented notation. APL's ideas heavily influenced a lineage of successor and sibling languages, including APL2 (IBM's extended version), J (created by Iverson and Roger Hui, using ASCII characters instead of special symbols), K and its descendant Q (used heavily in financial and time-series data systems, notably kdb+), and, more diffusely, the vectorized array operations found in modern numerical computing tools such as NumPy, MATLAB, and R. APL remains in active, if specialized, use today, particularly in financial services and legacy systems, and continues to attract interest from programmers drawn to its extreme conciseness for expressing mathematical and array-processing algorithms.
Key Features
- Array-oriented ('vectorized') operations applied to whole arrays without explicit loops
- Compact set of special mathematical symbols requiring a dedicated keyboard/character set
- Extremely terse, dense notation capable of expressing complex algorithms in very few characters
- Originated as a mathematical notation before being implemented as an executable language
- Rich built-in operators for matrix and array manipulation (transpose, reshape, outer product, and more)
- Directly inspired successor languages J, K, and Q
- Designer Kenneth E. Iverson received the ACM Turing Award in 1979