OU blog

Personal Blogs

neil

prolog

Visible to anyone in the world

This week, alongside exam nonsense, I needed to clear rooms so that the floorers could get at...well, the floor.

This involved moving cupboards, cupboards full of books and assorted other crap. Often you have to empty stuff out of the, said, cupboards as they are far too heavy to move in their loaded state

One of these rooms was the head [or curriculum leader, or whatever they are called now] of computing's. So I had a look at the books. There were many about Prolog.

We'll leave aside the oddness of why these books were there, but it got me thinking. Prolog is a declerative language, I want to do M366, it probably makes sense to learn it now. So I stole a book.

[June will be OK with this, she's a mate who knows my tendancies around books that interest me.]

So I downloaded an, I'm not sure, implimentation, interpreter, compiler...? Anyhoo a something.

I wrote my first programme today. What did I notice?

I need a different mind-set to the one I usually have, you have to let go in a different way.

It was my attempt at defining a recursive [I want to say function but I probably mean...] predicate that really brought home the differences between Prolog and the usual way I do things. In Prolog you need to write two functions, that have the same signature, and both get called. This is mad!

Which means that it is something that I should be doing.

I've puzzled for some time over the bit of the book which explains why this has to be, still at sea.

Permalink 4 comments (latest comment by Tom Capey, Sunday, 21 Oct 2012, 16:24)
Share post

This blog might contain posts that are only visible to logged-in users, or where only logged-in users can comment. If you have an account on the system, please log in for full access.

Total visits to this blog: 252618