Kirk is a software developer who has filled most roles on the software developer team. He is the author of Java Design: Objects, UML, and Process (Addison-Wesley, 2002) and he contributed to No Fluff Just Stuff 2006 Anthology (Pragmatic Bookshelf, 2006). His most recent book, Java Application Architecture: Modularity Patterns with Examples Using OSGi was published in 2012. Kirk is a DZone Zone Leader and has posted 77 posts at DZone. You can read more from them at their website. View Full User Profile

Clojure - An Introduction

05.04.2009
| 8577 views |
  • submit to reddit

Clojure is a dynamically typed, functional programming language available on the JVM. A significant benefit of functional programming is the ease with which the languages can be used to program concurrency. It does this through immutable state. Functions are only dependent on the arguments passed into it, and do not modify any global data. As a result, there are no side affects.

Recently, R. Mark Volkmann put together an excellent Clojure tutorial.  The tutorial is very thorough, including information on how to download and get started with Clojure. To provide some perspective for Java developers not familiar with Clojure, the first example shows the same simple program implemented using both Java and Clojure code. There is also a great section on Java interoperability, showing the syntax for how Clojure programs can leverage the Java API.

There's been a lot of innovation in the programming language space the past few years, with more to come going forward. With the JVM supporting an ever expanding number of programming languages, the barrier to adoption has been reduced significantly. Development teams can adopt a new language while still leveraging their existing platform investments. In other words, the ops guys don't know it's not Java. Find the time to check out this tutorial. It's worth it!

Published at DZone with permission of its author, Kirk Knoernschild.

Comments

J Szy replied on Mon, 2009/05/04 - 2:38pm

Development teams can adopt a new language while still leveraging their existing platform investments. In other words, the ops guys don't know it's not Java.

...until they hire some Java programmer to do code maintenance and find out the hard way.

More seriously: any sane company won't allow the "developers" to choose freely the programming language to use in a project. Of course, the company may agree that developers use what they find the best choice, if the choice doesn't break the company policy.

With the JVM supporting an ever expanding number of programming languages, the barrier to adoption has been reduced significantly.

I don't think so. Microsoft and Sun may support and fund Ruby implementations targetting their respective VMs, but it doesn't really make Ruby popular. In fact, despite all hype, it's still much less popular than python, perl, let alone Java or C#.

It just isn't that simple. There may be all of the JVM libraries available for free, but still hardly anyone wants to bet the project on Ruby, much less Clojure.

Andrew McVeigh replied on Mon, 2009/05/04 - 5:51pm

"In other words, the ops guys don't know it's not Java...." until they hire some Java programmer to do code maintenance and find out the hard way. 

Very well put.

The choice of an implementation language should be upfront and involve all stakeholders.  Well, it should be at any professional workplace.  And if you are big enough to have an ops team, you are big enough to need consensus on this.  I speak from experience and painful memories of obscure languages causing major maintenance headaches.

 

 

 

Raghu Semburakk... replied on Wed, 2009/05/06 - 5:03pm

Microsoft already working on Functional & Object oriented language called F#. Hope many of you guys aware of it.  Here is the link if you want explore more on that: http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/

 

I'm not sure how clojure is different. If some one explored on both areas, you may share your input.

Howard Lewis Ship replied on Wed, 2009/05/06 - 6:04pm

Clojure is functional, not object oriented. It has a Lisp syntax, with some careful extensions. It's a lot of fun to program in. It has great interop with Java, and has wonderful concurrency support built in. Read the Clojure tutorial for more details.

Neon21 (not verified) replied on Thu, 2010/11/25 - 2:34am

Well, it should be at any able workplace. And if you are big abundant to accept an ops team, pass4sure 642-374, pass4sure HP2-B35, pass4sure HP0-J37 you are big abundant to charge accord on this.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.