News for hackers. Stuff that matters.
Re:Why I Switched from Python to Clojure (2016) by malvosenior on Sunday March 24, 2019 @06:48PM (#19479218)
Clojure works on the JVM so you have native access to all of the Java ecosystem. With that in mind I'd say the libraries are actually better for Clojure with the exception of data analysis. I don't think there's a language out there that has as many data libraries as Python (like Pandas).
Re:Why I Switched from Python to Clojure (2016) by john2x on Monday March 25, 2019 @02:26AM (#19480652)
I really don't understand this point about just using Java libraries in Clojure. Why not just use Java? Wouldn't the experience of writing Clojure that fits the Java library's model be horrible?
Re:Why I Switched from Python to Clojure (2016) by mschaef on Monday March 25, 2019 @06:02AM (#19481299)
Not really. Clojure has nice native syntax for Java interop (or JavaScript for ClojureScript). In fact, I'll occasionally use Clojure to explore a Java API while working in Java.

What happens in my experience is that Clojure programs do tend to encapsulate more extensive use of Java interop into their own modules. For more standard or commonly used packages, this means a canned library or similar. (But this notion of abstracting out APIs is just good software engineering in general, and not really specific to Clojure or anything else.)

Re:Why I Switched from Python to Clojure (2016) by bradcypert on Monday March 25, 2019 @09:35AM (#19482275)
The main points being:

1. If you need it, and there's not a Clojure alternative, you don't have to write your own. 2. If you have any proprietary .jars or anything like that, you can leverage those services, models, etc when building an existing Clojure app. This is mainly a transition-type thing, in my experience. "Well, we could try Clojure but then we cant reuse any of our existing models." Not entirely true. However, you probably will want to change those from mutable classes pretty quickly :)

Re:Why I Switched from Python to Clojure (2016) by Scarbutt on Monday March 25, 2019 @12:02PM (#19483706)
Yes, you are suddenly writing java with parentheses.

Don't get me wrong, Clojure is a great language in itself, but the lack of libs make you spent 90% of your time writing interop, you start to ask yourself if it's worth the trouble.

Re:Why I Switched from Python to Clojure (2016) by malvosenior on Monday March 25, 2019 @01:29PM (#19484542)
I actually find Clojure's `doto` notation to be the cleanest way to interact pure Java. It's like an improved syntax for Java that's native in Clojure.
Re:Why I Switched from Python to Clojure (2016) by vips7L on Sunday March 24, 2019 @07:21PM (#19479335)
Aren't there a lot of data libraries for scala?
Re:Why I Switched from Python to Clojure (2016) by fiddlerwoaroof on Sunday March 24, 2019 @07:26PM (#19479344)
Yeah, at the very least, there's Spark, which is reasonably nice to use from Clojure via the Java API:

https://github.com/finalfantasia/apache-spark-examples-in-cl...

Re:Why I Switched from Python to Clojure (2016) by malvosenior on Sunday March 24, 2019 @07:31PM (#19479361)
Yes but more data engineering than data science (someone else mentioned Spark).