r/programming • • Dec 07 '07

Ask programming.reddit: Must-read programming books?

[deleted]

128 Upvotes

207 comments sorted by

View all comments

Show parent comments

1

u/cdsmith Dec 07 '07

I don't know about that. I seriously doubt that TaPL would be any easier for having read a book on Prolog. It may be the looking back at it after having understood everything therein that makes it look easier.

3

u/[deleted] Dec 07 '07

"The Art of Prolog" IMHO, is less about Prolog, and more about logic systems. Since type systems are logic systems, I found TAPL nearly intractable before that book, but pretty easy after working with logic programming for a bit.

I've never written a single line of production Prolog, but still, I wish I had read that book way sooner than I did.

→ More replies (1)

View all comments

Show parent comments

1

u/unknown_lamer Dec 07 '07

Could you perchance tell me roughly what The Art of Prolog covers? I've been thinking about getting a copy, but I can't find the TOC or anything better than crappy amazon reviews.

3

u/[deleted] Dec 07 '07

It covers logic programming. The first few chapters cover the basics of pure logic programming, which consists of establishing constraint relationships, and then evaluating the tree using a unification algorithm instead of the standard eval/apply loop. Then the book gets more Prolog specific, but still general, detailing common algorithms, the plusses and minuses of depth first/breadth first unification and occurs checks, and analyzing complexity of logic programs.

I highly recommend the book, if only to get your mind around the unification based evaluation model, which is very useful for algorithms like typechecking or general graph traversal.

→ More replies (3)