Clojure in a Closure – A New IDE for yet another Scripting Language

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.

Cons:

Pros

  • 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.

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.

Advertisements

About chronologicaldot

Just a Christ-centered, train-loving, computer geek.
This entry was posted in software, tech news and opinions and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

One Response to Clojure in a Closure – A New IDE for yet another Scripting Language

  1. You can also get help and lots of examples from the community-supported Clojure Docs:
    http://clojuredocs.org/

Enter the space and time of my little world... Welcome Earthling.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s