New Language

I’ve been wondering what language to learn next for a while. Scala caught my eye. I really should spend more time with Ruby since Rails programming hasn’t taught me much about the dynamic aspects of the language, which is what makes it interesting. I also want to pick up Scheme at some point. So what language did I go for? Prolog.

Not the most practical language in the world, but it’s one of those languages I liked at university but haven’t played with since. It’s not the most popular language either, in fact I think they’ve dropped the advanced Prolog course from the Computing degree at Imperial, which is a shame.

Clause and Effect: Prolog Programming for the Working Programmer

Since I’ve done some Prolog programming before I avoided a beginner’s tutorial and went for Clause and Effect: Prolog Programming for the Working Programmer, which is a terse introduction and series of exercises. I’ve worked through the first two chapters, which is a refresher on lists and backtracking, and remember why I like it so much. You just state what the program is supposed to be rather than how it’s supposed to do it. I remember going from the Prolog labs to Java programming and getting annoyed that just writing a pre and post condition wasn’t enough, you actually had to manipulate your data.

I’m not sure how learning Prolog again will improve my programming, but I’m certain it will, at very least it’ll make me consider backtracking as another form of control flow.

On a slight tangent, IBM DeveloperWorks has an interesting article on how you can use continuations in Scheme to implement Prolog style backtracking. They also show how to implement Python’s generators and Java’s exceptions. I really must learn Scheme so I can understand it. ;)

Spread the word: Technorati related  |  Technorati related  |  del.icio.us bookmark it!  |  submit New Language digg.com digg it!  |  reddit reddit!

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>