Learning of Prolog

Sometime ago, I decided to learn one new language. The two candidates are Erlang and Node.js, both are designed for parallel programming, and optimize multiple cores of CPU.

Then I found this result from the first link of Google, indeed, learning a new TYPE of language might be more interesting for me now, so I just head on Erlang. 

http://stackoverflow.com/questions/3011317/node-js-or-erlang


I recalled that I actually purchased a book called '7 languages in 7 weeks' weeks ago, so I opened the book and took a look at the Erlang part. It turns out that, the book was written in a much deeper than I expected. I thought this book just provides some brief introductions of different languages, but it turns out to work out  in-depth discussions and exercises of all 7 languages. 

And more importantly the author organized the 7 languages in a systematic way, and the reader is expected to learn the different languages in the order the book designed. This is useful for readers, because different languages are in fact co-related, and each language language borrows something from others (except those ancient ones, e.g. assembly). The author carefully designed the different tutorials so that the reader could understand each language in a most effective way.

However, the first language is the one I don't like too much -- ruby. Since I have used python for a long time, inevitably I don't have much good feeling about this language, though I did try to learn this language sometime ago.

Finally, I decided to pick up the language most related with erlang -- prolog. This is the language that I felt most painful during my university life. It's so odd, I really don't have much idea what it is really doing, even though I managed to finish the corresponding exercises.

But this book is good, really good. It let me understood what the HELL is going on here, in one sentence. The prolog, actually is a query system, like SQL server. That, explains everything. It's all about join and matching. That's why it's not a procedural language, that's why we need to provide the rules and facts. Because it's not about steps of programming, it's more about QUERYING.

It took about 30 minutes to finish the prolog exercise. The exercise is a little difficult, but definitely workable. And it's really interesting to work on that.

你可能感兴趣的:(Learning of Prolog)