APL, short for A Programming Language, is a high-level, array-oriented programming language created by Kenneth E. Iverson in the 1960s. APL is designed for mathematical computation, data analysis, and interactive problem solving, making extensive use of symbols to represent operations and functions on arrays. It can be used via interpreters such as Dyalog APL, GNU APL, or APLX, and programs are run interactively in a workspace environment or through scripts executed by the interpreter.

APL exists to simplify array manipulation and complex mathematical computation. Its design philosophy emphasizes concise notation, expressive array operations, and interactive exploration, enabling developers and analysts to perform calculations and transformations on entire datasets with minimal code.

APL: Scalars and Arrays

APL operates primarily on arrays, including scalars (single-element arrays), vectors, and matrices.

⎕ ← numbers ← 1 2 3 4 5
⎕ ← matrix ← 2 3 ⍴ ⍳6

Scalars are treated as one-element arrays, vectors hold sequences, and matrices represent two-dimensional data. Operations typically apply simultaneously to all elements.

APL: Functions and Operators

Functions are defined using or direct assignment, and operators like +, -, ×, ÷, and apply to arrays in a pointwise or reduction manner.

sum ← +/ numbers        ⍝ reduce sum
squares ← {⍵*2} numbers  ⍝ square each element
⎕ ← sum
⎕ ← squares

Operators such as / perform reductions across arrays, enabling concise expression of aggregate calculations.

APL: Conditional and Comparison

Conditional logic is implemented using functions and comparison operators like =, , >, < to select or filter array elements.

mask ← numbers > 3
⎕ ← numbers / mask

This allows selection and manipulation of subsets of data without explicit looping, highlighting APL’s array-oriented approach.

APL: Nested Functions and Reduction

APL supports nested functions, tacit (point-free) style, and reductions over arrays for concise and expressive computations.

dot ← +/ .×/ matrix ⍵
⎕ ← dot 1 2 3

Nested functions and operators enable complex transformations with minimal syntax, making APL suitable for mathematical modeling, finance, and engineering applications.

APL is used in finance, data analysis, scientific computing, and educational settings. It integrates with languages like J, GNU APL, and Python with APL libraries for extended functionality, enabling both interactive exploration and programmatic array computation.