News for hackers. Stuff that matters.
Re:Learning Clojure Made Easy by justaquickquest on Tuesday October 03, 2017 @07:09PM (#15396992)
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.

Re:Learning Clojure Made Easy by didibus on Wednesday October 04, 2017 @01:33AM (#15398481)
Well, 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/ , 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!

Re:Learning Clojure Made Easy by connormcarthur on Tuesday October 03, 2017 @08:29PM (#15397416)
In 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

Re:Learning Clojure Made Easy by agumonkey on Wednesday October 04, 2017 @05:56AM (#15399310)
If 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.

Re:Learning Clojure Made Easy by cle on Tuesday October 03, 2017 @08:26PM (#15397397)
If 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).

Re:Learning Clojure Made Easy by justaquickquest on Tuesday October 03, 2017 @08:30PM (#15397422)
Interesting, 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.

Re:Learning Clojure Made Easy by jballanc on Tuesday October 03, 2017 @10:57PM (#15397982)
Just 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.

Re:Learning Clojure Made Easy by jiyinyiyong on Wednesday October 04, 2017 @10:55PM (#15406426)
Clojure 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.
Re:Learning Clojure Made Easy by enraged_camel on Tuesday October 03, 2017 @08:13PM (#15397339)
Not sure why your comment got flagged. I think it's a valid question that deserves an informed answer.
Re:Learning Clojure Made Easy by justaquickquest on Tuesday October 03, 2017 @08:17PM (#15397363)
Yeah 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.