File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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.
It is sorta covered in the JavaRanch Style Guide.
subject: Clojure reminds me of OCaml
It's not a secret anymore!