3 ms·
Serious question: what problems does Clojure solve for programmers? Every time I try a new and interesting language I end up saying "Gee, that was pretty fun I
by justaquickquest 9y ago
Serious question: what problems does Clojure solve for programmers? Every time I try a new and interesting language I end up saying "Gee, that was pretty fun I guess" and then go back to whatever it is that I was using prior to that. I have never been able to justify moving away from Python or C. Learning a new language can be fun and enlightening in it's own ways, but it also feels like a waste of time.
Just curious if anyone can add some perspective.
- enraged_camel 9y agoNot sure why your comment got flagged. I think it's a valid question that deserves an informed answer.
- justaquickquest 9y agoYeah I genuinely would like an answer haha. I'm certainly not trying to start an argument I just don't know anyone personally who uses these designer languages (might be an unfair term) so I'm relatively uninformed.
- cle 9y agoIf you've ever done concurrent programming in Java I think you'd appreciate many of the design decisions made in Clojure. That's one of the biggest practical benefits. Also Clojure is dynamic to an extreme (like most lisps), which can make complex programs rather easy and short to write, which might be appropriate for some use cases. I do a lot of data munging, and I've tried many languages for it (Python, Scala, R, Java, Groovy, JS, Clojure), and Clojure is by far my favorite for clarity, simplicity, and speed. And because the REPL toolchain (CIDER/Cursive) is head and shoulders above the rest (except maybe iPython).
- justaquickquest 9y agoInteresting, I only have a passing familiarity with Java from school so I wonder if I'm just not appreciating what Clojure brings to the table in that regard. Thanks for the response.
- connormcarthur 9y agoIn a production environment: Clojure combines all of the resources of the Java/JVM environment with a nicer (in my opinion), dynamic syntax. It also has the best standard library of any language I have worked with, bar none. From a learning standpoint: Clojure and other functional languages are worth using because they make you approach problems differently, and in doing so you become a better programmer. Source: used Clojure in production building a real product for ~3 years
- agumonkey 9y agoIf compared to non recent java, clojure turns KLoC in LoC. Remembering raw swing vs seesaw gui makes me dizzy. Also, remember that when java devs were tired of suffering bloat, they invented gui designers to hide it. Now you have two problems.
- jballanc 9y agoJust a guess, but based on your comment that you can't "justify moving away from Python or C", I suspect you've never moved much beyond procedural programming, possibly with a bit of OOP mixed in. If you stick with procedural programming (and it's perfectly fine to do so), then it's true that most languages will not offer you much that Python and C cannot. If you're willing to re-think how you model the problems you're solving, you may find other languages, such as Clojure, help immensely.
- didibus 9y agoWell, I'd say Clojure's biggest advantage is that its fun and productive. Its performance equals Java's, which makes it one of, if not the fastest, dynamic programming language out there. Apparently, from the only empirical studies done on the matter, it also seems like code written in Clojure has the least defects of all other programming languages. What I find makes Clojure so much fun is the REPL, and the metaprogramming. There's always something new to learn, and experimenting and trying things is quick and painless. It helps that the language is full featured, comes with batteries included, has a very smart cohesive design across the board, with minimal quirks, and an inviting community. Its also pretty powerful, supporting everything the JVM gives you, and everything JavaScript gives you. So you can write desktop apps, backend services, multi-core processing, big data distributed jobs, CLI tools, web apps, mobile apps, scripts, etc. There's even apparently a subset that can do systems programming: https://ferret-lang.org/ https://ferret-lang.org/ , though its unofficial. So, I understand you one hundred percent, all languages can do most things, and the benefits of one over the other are often exaggerated, my reason, and I think the only good reason to switch to Clojure is if you've gotten bored, and need to revive your flame, switch to Clojure and have more fun!
- jiyinyiyong 9y agoClojure comes with a nice solution to persistent data structure, and it fully adopted the ideas behind it. Also it was designed for STM, it suits browser programming naturally. I think it's a nice balance between Functional Programming and practical usages.