2nd and 3rd day: Io + Prolog

Oh – my brain is not made for them… Well, Io is pretty cool, but the lack of syntactic sugar kills my brain. It’s really important to understand the concept of messages. Of course we are all using messages in the object oriented languages (usually called methods) for the understanding of Io it seems to be important to take a closer look at this concept. The idea of using prototyping instead of having classes is similar to JavaScript.

Prolog is unbelievable impressive! And very different from writing programs in any other kind of language. With Prolog you can solve logical problems extremely fast – not fast in the meaning of execution time, but fast in the meaning of programming time. Let me explain it… Usually you are writing a program by telling the computer each step of what to do and how to do it, Prolog is different. If you want to solve a sudoku in C will probably use a backtracking algorithm. So you tell the computer what is a valid solution and then test each combination by using the algorithm and of course you have to give the computer the ‘unfinished’ solution as starting point.

With Prolog only tell the computer the rules and the starting point. No need to write any algorithm! This problem can fully be solved by the given rules. It’s like magic 🙂

Leave a Reply

Your email address will not be published.