I have heard about clojure and I often hear it enables to write code in a way that takes of redundant code and increase productivity.
Is it worth investing time to learn clojure for the sake of increasing productivity? Is it a significant increase?
Things that will negatively impact productivity when you first start (assuming they are new to you)
- Unlearning the OOP way
- The LISP syntax
- Learning about all the core functions
- Functional paradigm
- Finding and learning the right libraries
- Structuring your code
- Tooling and Editor support (very much needed to be productive) and REPL workflow
- Context switching between Clojure and other languages
- Familiarity with the JVM ecosystem and Java error messages
Now that that’s out the way, many of the things I listed are the same things that contribute to Clojure’s productive reputation, once you get over the initial hump, which can take a while for some.
Additional things that only contribute to productivity:
- Well thought out data structures and use of the same set of functions (map, reduce, assoc, conj, etc.) to operate on them.
- Simpler and safer concurrency support
- The entire set of JVM libraries at your disposal, you don’t need to wait for a Clojure version.
- REPL driven development
- One language for the full stack if you want it
- Great interop with host languages (Java, JS)
Im probably forgetting a bunch of stuff but i’m typing this on my phone on the move.