This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Clojure and the fly likes Clojure reminds me of OCaml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Clojure reminds me of OCaml" Watch "Clojure reminds me of OCaml" New topic

Clojure reminds me of OCaml

Alexander Morgovsky.Pmp

Joined: Apr 29, 2011
Posts: 5

The functional programming aspect of Clojure reminds me of OCaml. In my first computer science class they had us do OCaml before Java, and I remember recursion was a huge topic, and it looks like Clojure allows us to do the kind of efficient recursion we need for sorting algorithms, mathematical programming and the like. I personally haven't see Clojure until today, and it looks like something I will pick up again considering how useful I think functional programming is.

Alexander Morgovsky, PMP
Amit Rathore

Joined: May 08, 2011
Posts: 20


A lot of people are using Clojure because of its functional programming style; coupled with the fact that all of Clojure's core data-structures are immutable, and it has a very efficient implementation of STM (software transactional memory) that allows for (correct!) lock-less multi-threaded programming. This is fantastic news for multi-core processors (all modern hardware have multiple cores, and this trend will keep going).

In short, Clojure's functional paradigm and concurrency support is itself a huge win. Couple that with the fact that it runs on the JVM, and that it is a modern LISP, it is no surprise that it is seeing remarkable adoption across many domains.
jQuery in Action, 2nd edition
subject: Clojure reminds me of OCaml
Similar Threads
Will Clojure be popular among Java programmers?
Real-life Clojure examples
What's new in "Clojure in Action"?
Thinking functionally
iteration vs. recursion