Cover of Clause and Effect

Clause and Effect

by William F. Clocksin · first published 2003

20mentions
7recommended by
8HN commenters
2008–2026first – last mentioned

88% recommend13% neutral

Why HN recommends it

Short, practical introduction to Prolog with good worked examples such as symbolic differentiation and FFT; suits people who want to start coding quickly and hit the ground running.

Summarised by Claude from recommending comments

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

20 2007: 0 mentions2008: 1 mention2009: 2 mentions2010: 2 mentions2011: 1 mention2012: 0 mentions2013: 0 mentions2014: 1 mention2015: 0 mentions2016: 0 mentions2017: 0 mentions2018: 2 mentions2019: 1 mention2020: 0 mentions2021: 1 mention2022: 0 mentions2023: 0 mentions2024: 1 mention2025: 0 mentions2026: 1 mention200720172026

What Hacker News says

  • parenthesis · Jul 21, 2010 · Recommends

    Two good books which are in the sort of style you seek are: The Little Schemer <http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...; and Clause and Effect <http://www.amazon.com/Clause-Effect-Programming-Working-Prog.... Also a help is that the languages they use ('use' is a more appropriate word here than 'teach') — Scheme and Prolog, respectively…

    on “Ask HN: Programming books that are more like math books?” ↗
  • silentbicycle · Nov 7, 2009 · Recommends

    If there is, by all means take it. In case there isn't, though, here are some books I've found particularly helpful teaching myself the same material. (This is a lot of reading, and they'll take time to work through. Alternating between studying theoretical stuff and working on real projects will help keep you grounded.) First off, absolutely get a copy of _Structure and Interpretation of Compute

    on “Ask HN: Confused semi-newbie programmer needs some advice.” ↗
  • parenthesis · Aug 17, 2008 · Recommends

    I've only dabbled in Prolog so far, but enough to be able to thoroughly recommend the book Clause and Effect by Clocksin. As one of the amazon reviewers says 'It serves roughly the same purpose for the Prolog language that "The Little Schemer" serves for Scheme.' http://www.amazon.com/Clause-Effect-Programming-Working-Prog...…

    on “My Life as a Prolog Implementor” ↗
  • silentbicycle · Jul 22, 2010 · Recommends

    …generally want code to read as much like logically valid relations as possible. A major strength of Prolog is that "clean" Prolog code is extremely easy to reason about with only local context. Chcek out _Clause and Effect_ by Clocksin and _The Art of Prolog_ by Sterling and Shapiro. CAE is sort of like _The Little Schemer_ for Prolog, but has a couple larger case studies as well. TAoP is one of my absolute favorite programming…

    on “Lisper's first look at Haskell” ↗
  • silentbicycle · Nov 22, 2010 · Recommends

    William Clocksin's _Clause and Effect_ is a similarly styled book, using Prolog. It also has a couple good case studies. I also highly recommend Sterling and Shapiro's _The Art of Prolog_.

    on “99 Prolog Problems” ↗
  • silentbicycle · Dec 6, 2010 · Recommends

    Sterling & Shapiro's _The Art of Prolog_ is fantastic, if _Learn Prolog Now_ piques your interest. Clocksin's _Clause and Effect_ is sort of like "The Little Schemer" for Prolog (though not cutesy). Also, if you learn Prolog, don't forget to learn the constraint programming extensions! SWI and GNU Prolog are free Prologs with…

    on “Learn Prolog now” ↗
  • silentbicycle · Sep 22, 2009 · Recommends

    …details. As introductions go, _The Art of Prolog_ is also a great book (like SICP great), and spends a lot of time on the logic programming paradigm and its big ideas rather than Prolog-specific details. _Clause and Effect_ by Clocksin is a _The Little Schemer_-like intro, though its style is a little more conventional.

    on “Learn You Some Erlang: Three new chapters available” ↗
  • jonjacky · Oct 8, 2009 · Recommends

    "Clause and Effect" by Clocksin. Also, the worked exercises at Ninety-Nine Prolog Problems, https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/

    on “Ask HN: Good books to learn Prolog?” ↗
  • silentbicycle · Aug 27, 2010 · Recommends

    "SICP for Prolog" would probably be _The Art of Prolog_ by Sterling & Shapiro, mentioned above. Clocksin's _Clause and Effect_ would definitely be the _Little Schemer_ of Prolog. (No elephants or PB&J, though.)

    on “Books that will Substitute for a Computer Science Degree” ↗
  • silentbicycle · Nov 27, 2010 · Recommends

    We've already talked about _The Reasoned Schemer_ in another thread. :) I may give it a try again eventually. Clocksin's _Clause and Effect_ is a similar book, in Prolog. Monads aren't that hard, they're just one step too general - at first, it's not clear what their examples have in common. It helped when I realized I'd already written…

    on “Which programming book you just couldn’t stop reading from start to end?” ↗
  • silentbicycle · Aug 24, 2011 · Recommends

    Cleaner, yes. I picked OCaml because it seemed easier to find information about, and more widely ported. Also, I think most people fail to appreciate how useful compiler techniques are outside of "compilers". Even just knowing a little about lexing and parsing goes a long way. For Prolog, I'd also recommend _The Art of Prolog_ by Sterling & Shapiro and/or Clocksin's _Clause & Effect_.

    on “What Every Computer Science Major Should Know” ↗
  • stass · Jan 5, 2021 · Recommends

    For starting out I'd recommend Clause and Effect by Clocksin. It's a very short but practical introduction with really good examples along the way (including symbolic differentiation and FFT).

    on “Why Learn Prolog in 2021?” ↗
  • dmpk2k · Jan 8, 2026 · Recommends

    The only decent Prolog book out there, IMNSHO, is "Clause and Effect" by Clocksin. Maybe some of the later chapters might help? All the other books that I looked at were pretty awful, including the usual recommendations.

    on “Stop Designing Languages. Write Libraries Instead (2016)” ↗
  • segmondy · Aug 25, 2019 · Recommends

    Not even comparable. The OP posted a book, but you posted is a guide of no more than 30 pages. Novice: Adventure in Prolog Learn Prolog Now Logic Programming with Prolog Med - Advanced: Clause and Effect The Art of Prolog The Craft of Prolog Wam Book The Practice of Prolog Prolog Programming for AI - Brakto Deep Dive: Expert Systems in Prolog Natural Language Processing for Prolog Programmers Intelligent…

    on “Adventure in Prolog Tutorial (2016)” ↗
  • silentbicycle · Jul 21, 2010 · Recommends

    I second Clause and Effect. (The Little Schemer, too, but CAE doesn't get much attention.) Sterling and Shapiro's _The Art of Prolog_ is also excellent, though you'll probably be better off reading _Clause and Effect_ first if…

    on “Ask HN: Programming books that are more like math books?” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help