3 ms·
Not to be pedantic, but since Clojure is a hosted JVM language (as one of a few platforms it's hosted on) and has full interoperability with Java, by definition
by mnm1 7y ago
Not to be pedantic, but since Clojure is a hosted JVM language (as one of a few platforms it's hosted on) and has full interoperability with Java, by definition it has more libraries than Java as it has all the Java libraries plus all the clojure libraries. So definitely not library support in recent years but maybe back in the days. Performance was an issue early on as well, but that's certainly not the case now. Clojure is extremely performant and outperforms pretty much all the popular interpreted languages easily.
- didibus 7y agoYup, it can also now use all of the Python libraries as well: https://github.com/cnuernber/libpython-clj https://github.com/cnuernber/libpython-clj So it now has all of Java, JavaScript and Python ;)
- mnm1 7y agoOr clojure, java, scala, kotlin, python, ruby, JavaScript, c, cpp, r all together with graal vm. https://www.graalvm.org/ https://www.graalvm.org/
- vips7L 7y agoThis is really a non-argument since Graal [0] can do anything JVM plus JS, R, Python, Ruby, and LLVM. [0] https://www.graalvm.org/ https://www.graalvm.org/
- didibus 7y agoPolyglot programming with Graal will eventually be awesome, but it isn't yet. If it was, I'd use Graal to use Python libraries from Clojure, but I'm not, because it still has some ways to go. So for now, I use Pandas, Numpy, matplotlib, and all that from Clojure using libpython-clj. Which is the biggest issue with graal-python currently, how to leverage all the C-based libraries. That's where libpython-clj excels over Graal.
- vips7L 7y agoYeah binding with C is a general JVM problem. Hopefully project Panama will solve that soon :)
- Random_ernest 7y agoWhat is your experience with python interop in clojure? Does it work sufficiently well that it is really usable or is it rather experimental?
- slifin 7y agoYep and even then Clojure has Erlang and .net runtimes and interop built syntactically into the language, GraalVM has to reimplement those languages in it's tooling so they'll always be playing catch-up with the real implementations (unless they merge) That said we do like GraalVM it has a cool ability to create native binaries out of Clojure apps, which is currently powering a resurgence in Clojure for scripting the last wave had to use Clojure's JavaScript target (cljs)
- maliker 7y agoInteresting. We didn't look at this closely since we liked the numpy/scipy/sagemath tools, but we should have realized this put clojure ahead of java. Especially java's 2009 features and syntax.
- flavio81 7y ago>Not to be pedantic, but since Clojure is a hosted JVM language (as one of a few platforms it's hosted on) and has full interoperability with Java, Armed Bear Common Lisp is an ANSI Common Lisp, thus can use all CL libs, runs on the JVM, and it can easily call Java libraries. In fact as easy as calling regular lisp functions.
- _pmf_ 7y agoDue to the fact that Clojure has its own classloader hierarchy, quite a few libraries that require AOP like mechanisms (or even OSGi components) cannot be as easily used from Clojure.