3 ms·
Clojure has massive amounts of ecosystem and toolchain pain, even though it is a cool language. Most common dev environment for it is a complex emacs tool chain
by billfruit 4y ago
Clojure has massive amounts of ecosystem and toolchain pain, even though it is a cool language. Most common dev environment for it is a complex emacs tool chain. If you are seeking the simple joys of programming, Clojure is unlikely to be what you want.
- capableweb 4y agoI beg the differ. Setting up a Clojure deps environment requires like one file, want a REPL to connect to your editor? Usually add one/two lines to the deps.edn file + install the extension for your editor. The ecosystem also has a huge emphasis on backwards compatibility and finishing libraries rather than the constant churn you see in other ecosystems. I can usually find a 5 year old Clojure library and include in my project without any problems at all, and when a major library want to try out an idea that changes the interface, they usually start a new library instead of forcing everyone to use the new interface they've come up with. I'd say if you're seeking simplicity in terms of environment and programming, Clojure is definitely the way to go. And this is coming from someone who knew 0% Java coding before jumping into Clojure, and almost never touch/read any Java code when doing Clojure programming.
- TacticalCoder 4y ago> Most common dev environment for it is a complex emacs tool chain. IntelliJ + Cursive is not far behind. From the 2021 Clojure survey 43% of the devs were on Emacs and 31% on IntelliJ/Cursive. Then 12% VS Code etc. Anyway I don't think an Emacs setup to develop in Clojure is that complex. I'm using Emacs with both Cider and LSP: doesn't strike me as particularly complicated to set up. If you're familiar at all with Emacs, it's pretty straightforward to configure. If you're not familiar with Emacs, you can use IntelliJ with the Cursive plugin: apparently as much as one third of all the Clojure dev opt for that setup. As a sidenote apparently 52% of the Clojure devs are on OS X and "only" 37% on Linux.
- epgui 4y agoClojure with VSCode (with the Calva extension) is a breeze.
- eduction 4y agosetup and emacs were quite simple for me - for emacs I just installed clojure-mode and cider via melpa like any other package. I think later I added paredit. All should include snippets for your emacs init file on their github project pages. When you have a project source file open you can M-x `cider-jack-in` (or C-c C-x j j) to open a fresh repl right in emacs. I found this useful advice for after cider and clojure mode are installed (skip the “configuration” section) - https://www.braveclojure.com/basic-emacs/ https://www.braveclojure.com/basic-emacs/ Setup on the Clojure/filesystem/JVM side was just leiningen - install lein and then `lein new app foo` gives you a fresh project dir for `foo`. You should probably install lein before the emacs stuff as cider may need a working Clojure install, not sure.
- waffletower 4y agoI don't believe this assessment comes from a professional Clojurist. Emacs is common but not necessary -- you can easily reach for Calva in Visual Studio Code. Leiningen provides a tested and very accessible build environment. But I prefer the Cognitect tools deps toolchain instead, which does have a larger learning curve. Again, the developer can choose. The author and many in the comments decry JSON parsing pain in Scala. JSON is handled elegantly in Clojure -- while Jackson (neatly wrapped by Cheshire) has its occasional CVEs to wrangle, you can instead employ clojure.data.json which is performant and free of Java transitive dependency bloat and CVE surface. The transitive dependency hell mentioned in the article seems to be exacerbated by Scala tooling, though Java inter-dependencies can be complex and difficult to manage in any JVM language. I have found Clojure's tools deps toolchain to give the most elegant dependency management experience I have experienced on the JVM.