3 ms·
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 th
by malvosenior 8y ago
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).
- vips7L 8y agoAren't there a lot of data libraries for scala?
- fiddlerwoaroof 8y agoYeah, 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-clojure/blob/master/src/clojure/apache_spark_examples_in_clojure/spark_sql_example.clj#L37 https://github.com/finalfantasia/apache-spark-examples-in-cl...
- malvosenior 8y agoYes but more data engineering than data science (someone else mentioned Spark).
- john2x 8y agoI 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?
- mschaef 8y agoNot 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.)
- bradcypert 8y agoThe 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 :)
- Scarbutt 8y agoYes, 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.
- malvosenior 8y agoI 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.