An esoteric programming language (often shortened to esolang) is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, as software art, as a hacking interface to another language (particularly functional programming languages or procedural languages), or as a joke. The term distinguishes these languages from programming languages used by working developers to write software for practical, production environments.
Characteristics
Esoteric programming languages are typically characterized by one or more of the following traits:
- Minimalism: Reducing the instruction set to the smallest possible number of commands (e.g., Brainfuck uses only eight commands).
- Obfuscation: Making code deliberately difficult to read, write, or understand (e.g., Malbolge, designed to be almost impossible to program in).
- Non-standard execution models: Using unusual paradigms such as two-dimensional instruction pointers (Befunge), image-based source code (Piet), or whitespace-only syntax (Whitespace).
- Thematic gimmicks: Basing syntax on specific themes, such as cooking recipes (Chef), Shakespearean plays (Shakespeare), or internet memes (LOLCODE).
History
The earliest known esoteric language is generally considered to be INTERCAL (Compiler Language With No Pronounceable Acronym), created in 1972 by Don Woods and James M. Lyon as a parody of the complexities and inconsistencies of languages prevalent at the time (such as FORTRAN, COBOL, and assembly).
The term "esoteric programming language" gained wider currency in the 1990s with the creation of languages like Brainfuck (1993, Urban Müller), which aimed for a minimal compiler size, and Befunge (1993, Chris Pressey), which introduced a two-dimensional instruction pointer.
The online community resource Esolang.org (the Esolang Wiki), founded in 2005, serves as the primary catalog and discussion hub for the design and implementation of these languages.
Categories
While not formally standardized, esolangs are often grouped informally:
- Turing Tarpits: Languages with minimal instruction sets that are Turing complete (e.g., Brainfuck, Iota, Jot).
- Non-deterministic Languages: Languages where execution involves randomness or undefined behavior (e.g., Befunge-93's '?' instruction, INTERCAL's
PLEASEsemantics). - Visual/Graphical Languages: Source code takes the form of images or spatial arrangements (e.g., Piet, Asciidots).
- Thematic/Joke Languages: Languages parodying specific styles or cultures (e.g., LOLCODE, ArnoldC, TrumpScript).
- Obfuscated Languages: Designed specifically to make programming difficult (e.g., Malbolge, Cow).
Computability
Many esoteric languages are Turing complete, meaning they can compute any computable function given enough time and memory, despite their impractical syntax. Proving Turing completeness for a new esolang is a common recreational activity within the community. Some languages are intentionally not Turing complete (e.g., languages designed as finite state machines or pushdown automata).
Purpose and Reception
Esoteric languages are not intended for mainstream software development. Their value lies in:
- Computer Science Education: Demonstrating theoretical concepts (Turing completeness, minimal instruction sets) in extreme forms.
- Language Design Exploration: Testing syntactic and semantic boundaries that influence practical language design.
- Recreational Programming: Code golf, puzzles, and intellectual challenge.
- Artistic Expression: Treating code as a medium for visual or conceptual art (code poetry, generative art).