This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
What type of project would make one consider choosing Clojure over any other OO/Functional programming hybrid? In my experience any project can benefit from using both programming paradigms, which plenty of languages have nowadays.
Is there any type of project that is best suited for an implementation solely in Clojure?
It shows most of Java's OO mechanisms implemented in about 40 lines of Clojure.
Functional programming, especially with LISP (or Clojure) transcends Object Oriented programming. When you take Clojure's lexical closures, multi-methods, first-class functions, the macro system, immutable data-structures and the STM, you can write code that doesn't suffer from a lot of problems actually caused by typical implementations of "object-oriented" languages. I like to think of this quote by Alan Kay - "I invented the term Object-Oriented and I can tell you I did not have C++ in mind".
In short, OO is probably not what most people think it is... and the functional paradigm, especially when combined with all the other features of a language such as Clojure, actually delivers a lot more capability.
Thanks for the response. I'm not buying the one shoe fits all horses mentality. There must be some type of projects in particular that would be best suited for Clojure. I get that you can have OO concepts in Clojure, but it sounds like the idea is to solve problems in a different way using all functional programming? I just can't imagine modeling the world in software without OO concepts.
My point wasn't that one size fits all, but that the functional paradigm transcends, say OO. I also wanted to point out that it is so flexible, that you can "simulate" OO in just a few lines of code, not that you would, because that would be like saying a rifle isn't arrow-oriented.
To answer your modeling question, for instance: the functional paradigm can be applied to modeling business processes without modeling the actors (as OO does) but modeling the actions itself (functions). There's a lot more to it, of course, but it just involves a mind-shift and some practice. After all, people were building systems before OO.