Rich Hickey and his core programming team put together the dynamic programming language they call “Clojure“. There are so many programming languages out there, it’s hard to get yours noticed much less used. To draw attention to their language, the “core” team started a project called Clojure Script One – which, from the looks of it, is nothing more than a fancy looking website designed to snag geeks with its sleek appearance.
Okay, what is this? It’s Lisp, ML, Haskel, and some other languages crammed into a dynamic scripting language, according to the features page. Like Ruby and Python, this language is cross-platform, but instead of c, it’s written in Java. There are pros and cons to this. Allow my pessimistic side to start first.
- Java environment means it can be used for web pages (that’s nice, but do note that you will have to upload the language files to your site even for a simple page).
- It’s clean (discussion in a moment).
On his blog, Chris Granger mentions this sweet new IDE for Clojure called Light Table. What’s nice about it is it’s organization of code, its real-time analysis, it’s archived documentation. Yes, these things have been done before (except archived documentation, so far as I know), but not packaged up like this. I’m interested in seeing what this IDE and language have to offer.
- Care to give Clojure a try? – Download various versions here.
- Care to give Light Table a try? – (Update: Sorry, it’s not out yet. This download gives closure in a single file, the link for which I got it off of this page.)
- UPDATE (6/29/2012): Chris Granger, the inventor of Light Table, wrote 5 days ago saying the “playground” (stripped down version of Light Table) has been released for tryout/testing purposes. Unfortunately, it appears the link on his page is broken.
If you’d like to know more, you can read about Clojure on the promotion page, but I found it difficult to find anything useful. What would be impressive is if they made their entire website using the language.
I mentioned earlier that the language is “clean”. What does that mean? Programming languages are divided into three categories: logic, functional, and iterative. The natural human way of thinking is iterative: step by step instructions to the computer. Hence, iterative languages are dominant in the programming world (c, c++, Python, Ruby, and Java are all iterative). Logic languages simply utilize giant lists of associations. You ask if something is associated with something else and you get either a true or false. There are more complex ways to associate things (you can associate multiple things and ask about their relationships), but I’ve given you the gist of it. Functional languages are like math functions: you plug in a constant value, and you get a single output. The fact that values must be constant makes getting user input a task you can’t design within the language itself – you have to get it from some function. What makes this nice is that all other parts of your code (other than input) can be tested on-the-fly because all the values they need in order to execute are known (not that this isn’t true occasionally in other languages, but it isn’t true nearly as often). This is something the programmers of Light Table take advantage of to give you the power of debugging while you’re programming and not just after you’ve coded everything.
I intend to give Clojure a try. Here’s hoping the language is as simple and as easy to use as they say it is.
If you’re not familiar with using a functional language, you might try starting with Dr. Racket. It’s a dialect of Scheme, I believe.