The Simplicity of Prolog
Prolog’s appeal and paradigm
- Many commenters praise Prolog’s “small but powerful” core: once you internalize its logic/relational model, solutions can be surprisingly short, clear, and high‑level.
- Logic programming is seen as a strong complement to mainstream paradigms; some wish for “Prolog sections” in other languages, similar to regex or embedded SQL.
Limitations, abstraction, and “not fully declarative” issues
- Critics argue Prolog has weak abstraction: no implicit context parameters (“this”), leading to predicates bloated with repeated arguments or awkward global state (
assert/retract, blackboards). - Supporters counter that meta‑interpreters, DCGs, associative structures, and compilation hooks can reintroduce “context” and high‑level abstractions, though this can be non‑obvious.
- A recurring complaint: Prolog can express problems declaratively but naive search often loops or gets stuck; practical solutions may require cuts, tabling, or hand‑crafted control, which some see as undermining the ideal.
Constraint Logic Programming and expressiveness
- Constraint libraries (e.g., over integers/Booleans) are highlighted as modern Prolog’s killer feature, enabling concise solvers (e.g., Sudoku) that many find more elegant than imperative equivalents.
- Others respond that such examples are small and that for more complex combinatorial tasks solvers still hit walls.
Implementations, ecosystem, and standards friction
- SWI‑Prolog is repeatedly recommended as the most “batteries‑included” and beginner‑friendly (web playground, docs, debugger, libraries).
- Scryer and other systems focus on ISO purity, homoiconicity, and advanced CLP, but have fewer tools and libraries; there is visible tension around non‑standard syntax changes (notably SWI’s use of
.for dicts) and portability. - Discussion covers Logtalk, Mercury, Curry, miniKanren, Picat, Ciao, Quantum Prolog, Datomic/Datascript, Soufflé, DES, and Datalog more broadly; some find Datalog tooling immature and hard to use.
Real‑world uses and integration
- Examples cited: cancer research, particle physics, funding allocations, a Linux installer, a Prolog‑backed website stack, and a logic‑heavy database (TerminusDB).
- Prolog is described as inherently close to a deductive database/query language; it can also front SQL (via libraries) or replace parts of a LAMP stack.
- Parallel and distributed Prolog/search exist in research and some systems, but production‑ready GPU/cluster‑scale solutions are not clearly established in the thread.
Learning, tooling, and article feedback
- Multiple learning resources (lectures, books, playgrounds) are mentioned.
- Some readers liked the article’s Prolog vs OOP auth example; others criticized the site’s typography/contrast and a “don’t actually use this reverse” note as confusing about performance expectations.