The language you don't command: Prolog and the logic-programming dream
In most languages you tell the computer what to do. In Prolog you state what is true, ask a question, and the system works out how. Fifty years on it is a niche language, but the idea it embodied runs your database, your type checker, and once helped a computer win a quiz show.
Here is an entire Prolog program: parent(tom, bob). parent(bob, ann). grandparent(X, Z) :- parent(X, Y), parent(Y, Z). Two facts and one rule: X is a grandparent of Z if X is a parent of some Y who is a parent of Z. Ask it ?- grandparent(tom, Who). and Prolog answers Who = ann. Notice what you did not write: no loops, no search code, no step-by-step instructions. You described a world, and the language searched it. That inversion, declarative rather than imperative, is the whole idea, and it is why Prolog still matters even where Prolog itself is not used.
01Born in Marseille, theorised in Edinburgh
Prolog (programmation en logique) was created in 1972 by Alain Colmerauer and Philippe Roussel in Marseille, out of work on natural-language processing: they wanted a system that could parse French sentences and reason about them, and the tool became a language.1 The theory came from Edinburgh, where Robert Kowalski showed that a fragment of formal logic (Horn clauses) could be read two ways at once, declaratively as statements of truth and procedurally as recipes for computation. His equation, published in the Communications of the ACM, summed it up: Algorithm = Logic + Control.2 You supply the logic; the language supplies the control.
02How it actually works (in plain English)
Two mechanisms do most of the work. Unification is pattern-matching taken further: Prolog makes two terms equal by finding values for their variables, in either direction, so there are no fixed inputs and outputs, only relations. The same append/3 relation that joins two lists can be run backwards to split a list into every possible pair of parts. Backtracking is the search: Prolog tries a rule, and if it reaches a dead end it undoes its choices and tries the next one, exhaustively and automatically. What you would hand-write elsewhere as nested loops and a stack of partial solutions, Prolog provides for free.3
The catch is the second half of Kowalski's equation. When the built-in control strategy fits your problem, Prolog programs are very short (a Sudoku solver is about a page3); when it does not, you end up steering the search with the cut operator, and the declarative style becomes procedural quickly. Prolog is at its best when the problem really is search: parsing, scheduling, configuration, puzzles, rule systems, anything constraint-shaped.
Prolog's bet was that stating a problem precisely is most of solving it. On the problems where that holds, little else matches its economy.
03Boom, winter, standard
For one strange decade, Prolog looked like the future. In 1982 Japan's Ministry of International Trade and Industry launched the Fifth Generation Computer Systems project, a national effort to build massively parallel machines whose core software layer was logic programming, and Western governments, alarmed, funded competing programmes.4 The project ended in the early 1990s having produced good research but no revolution; expert systems fell out of fashion, the AI winter set in, and Prolog's mainstream moment passed. The language matured quietly through it: ISO standardised Prolog in 1995 (ISO/IEC 13211-1), giving the many competing implementations a common core.5
04Where Prolog lives now
The reports of its death miss where it went. IBM Watson, the system that beat the best human Jeopardy! players in 2011, used Prolog for its question-analysis layer: pattern-matching the parsed clue and extracting relations was exactly the search-over-rules problem Prolog was built for.6 The open-source SWI-Prolog is a genuinely modern platform, actively developed for over three decades, with HTTP servers, notebooks, and a package manager,7 and Markus Triska's The Power of Prolog has become the standard free modern text.8
The larger afterlife is by descent. Datalog, Prolog's restricted database-friendly subset, is having a revival in program analysis and modern databases; the Soufflé engine, for example, compiles Datalog to parallel C++ to analyse millions of lines of code at industrial scale.9 And the tools you already use rhyme with it: SQL asks what, not how; CSS selectors declare patterns and let the engine match; a type checker is a small logic engine deriving conclusions from premises. The Stanford Encyclopedia of Philosophy's survey of logic in AI traces this diffusion; the ideas escaped the language.10
05Where OcxlyDev lands
Should you learn Prolog in 2026? Not for a job posting; there are few. Learn it the way a pianist practises scales in an unfamiliar mode: an afternoon making append/3 run backwards will change how you see the declarative parts of your daily stack, and the next time a problem looks like search-over-rules, a config validator, an access-policy engine, a scheduling puzzle, you will recognise that writing the rules and letting an engine do the walking beats hand-rolling the loops. Install SWI-Prolog, work through the first chapters of The Power of Prolog, and ask a database a question you never told it how to answer.