What are the best ways to use Clojure for a new development?

Why should I choose Clojure for another language for a new project? In what areas does he excel?

+7
source share
3 answers

In some scenarios where I will use Clojure:

  • You are creating a new application with a high degree of parallelism , which must be reliably scaled. In my opinion, the Clojure concurrency functions (STM, default immutability, free MVCC lock) are the best of any main language at present. Rick Hickey's great Identity and State video is a great way to get an idea.

  • You are a Java-based store that wants a fast -moving, dynamic language that you can use to quickly develop or create scripts while saving your investment in the large strong> Java code base . I found Clojure to be quite effective at gluing Java code, as the interoperability is very good (and simple!).

  • If you want to use the functional programming language Clojure, this is pretty good (it is not quite as "clean" as Haskell, but it has all the key functions - first-class functions, higher order functions, immutability, laziness)

  • If you work in an area where there is a great need for code manipulation (compilers, DSL, natural language processing, genetic programming), where the LISP β€œcode is data” philosophy allows you to be extremely productive. This is a nice place for homoiconic LISP languages ​​in general.

+6
source

In order to provide exactly the kind of reductive response that Devin has in mind: I chose Clojure because I like the functional programming style and Clojure allows me to do this on the JVM and interact with a lot of existing code that runs on the JVM.

So, the question then becomes: why functional programming?

Continuous state - no side effects, easier testing, better concurrency support (and, in the future, parallelism).

Small functional components that can be easily used and used to create large, flexible systems.

+2
source

it is very difficult to find clojure developers, so I would stay away from it if you work in a large company and stick to java or .net. it is more a political than a technical solution in large companies. if, nevertheless, you create your own product, then clojure is developing very quickly and can enter the market faster.

+1
source

All Articles