5 ms·
I have been a Clojure newbie for over 3 years now and here is why I am still using it: 1. Clojure code makes sense to me : I could go back to Clojure code so
by manishsharan 9y ago
I have been a Clojure newbie for over 3 years now and here is why I am still using it:
1. Clojure code makes sense to me : I could go back to Clojure code someone wrote three years ago and I would have no problem in figuring out what the code was doing. With Java or Javascript, unless the code is documented with extreme diligence, the nuance are hard to decipher.
2. REPL based coding makes it easy to get code right before making it part of my namespace
3. lack of strong typing has not been a stopper for me yet. Spec is good enough for my needs
4. State and concurrency : Its hard to screw up concurrency and state mutation with Clojure
edit: formatting
- wry_discontent 9y agoWhat're you using it for? I really like the language, but it seems geared to replace Java for heavy enterprise enterprise applications. A lot of the benefits I hear people talk about sound like they require a large project to be properly noticed. I've used Clojurescript for a couple toy projects, but it seems awkward to me.
- manishsharan 9y agoI am using it to implement REST services using the Luminus library.
- swlkr 9y agoClojure is great for any size web app, but I will agree here, I found clojurescript awkward as well.
- TheSmoke 9y agoif you could elaborate on awkward part, i'd love to give you a hand. i have 1 react native app built with cljs and 1 chrome extension. using cljs is the best technical decision i've ever made.
- wry_discontent 9y agoI'm still a n00b, but I found the errors to be obscure. Often times, I couldn't even get an error to display when I _knew_ something was wrong. After I fixed that error, the app would show up again. For the most part, everything was incredible while it worked, but every so often very technical errors would come up and that makes me hesitate to advocate for its use at my job.
- didibus 9y agoClojure is good for everything you'd use Java for. So pretty much anything that's going to be long running, like services, or big apps meant to be open for a while. Yes, that fits the enterprise use case perfectly. A backend for any service oriented architecture, ETL jobs, data processing pipelines, backend for websites, rest/rpc/graphql services, client/server applications, big data analysis, machine learning, etc. Clojure is not good for quick scripts, use bash, python, perl, hy, clojurescript, etc. for that. Clojure is not good for low level code, like drivers, embedded systems, os, etc. Use rust, c, c++, D, etc. instead. Clojure isn't good for squeezing every ounce of power out of hardware, such as games, use C++, assembly, etc. for that. Clojure isn't good for mobile app development, use Java, swift, c#, objective-c, etc. for that. Clojure isn't good as an embedded scripting language, use LUA, python, javascript, tcl, scheme, etc. instead for that. Therefore Clojure competes mostly against Java, Scala, C#, F#, GO, NIM, Haskell, etc. Now as an astute reader, you've noticed how none of the competing languages I've listed are dynamic or of the lisp family. This makes Clojure unique in its space and the most controversial.
- zurn 9y agoI think Clojure fits well to quick scripts and exploraory programming, because of the rapid turnaround in interactive development. The finished tool, if compiled, will start fast enough (~1 second for hello world) even though it loses a bit to Python scripts. Clojure also lets you drop down to the most basic JVM primitives, like unboxed types and atomics/volatile, so you can do lower level stuff than in other dynamic languages. You can even follow the asm code generated by the JIT. Combined with macros and other DSL building capabilities, I'd say doing low level or performance oriented work can be pretty productive with Clojure. DSL building blocks and dynamic nature also make it a pretty good embedded scripting language. Many embedded systems are plenty powerful enough to run Clojure (or Python or Java), so it works there too.
- didibus 9y agoWhat you say is true, yet false. While you can use Clojure for script, or performance heavy tasks, or embedded systems, I think it's pretty obvious it's not the right tool for those, at least not yet. If you want to mess around with scripts, performance heavy tasks or embedded systems, sure you can use Clojure, but if you are serious about any of them, it wouldn't make sense. You'd turn to languages that are better suited.