3 ms·
Love this. As a Lisper I’m always intrigued by Clojure but as someone with no knowLedge of or desire to learn to JVM I stayed away since I figured eventually I’
by jshaqaw 4y ago
Love this. As a Lisper I’m always intrigued by Clojure but as someone with no knowLedge of or desire to learn to JVM I stayed away since I figured eventually I’d hit JVM questions/issues I frankly didn’t feel like dealing with.
Is it really 100 percent compatible with Clojure or is that just aspirational.
Also, is it the case that lots of libraries/workflows outside the core language in Clojure assume Java integration? I always thought a big Clojure selling point was the awesomeness of Lisp while having full access to the libraries of Java.
- capableweb 4y ago> Is it really 100 percent compatible with Clojure or is that just aspirational. Aspirational. The project is really early still, and in the middle of a grand rewrite so basically it doesn't build at the moment, see https://github.com/jeaye/jank/issues/7 https://github.com/jeaye/jank/issues/7 Current progress seems to be outlined here: https://jank-lang.org/progress/ https://jank-lang.org/progress/
- vaylian 4y agoThe official Clojure (JVM) project has an official sister project: ClojureScript, which is designed to be compiled to JavaScript (and maybe Webassembly in the future?). There is a lot of code that runs with both languages and therefore I don't think you should worry too much about using Jank with existing Clojure/ClojureScript libraries.
- mjul 4y agoClojure is a language without a platform so all the Clojure dialects have the different semantics of the underlying platform, be it the JVM or JavaScript. For example ClojureScript has all the “wat” semantics from JavaScript primitive types. You can build libraries that try to hide the differences but the leaky abstraction is inherently still there.
- JonChesterfield 4y agoI didn't realise clojurescript did that, though clojure certainly threw JVM stack traces at me. That seems a shame - a language implementation is an abstraction that doesn't have to leak, the layer below can be totally inaccessible if desired.
- z9znz 4y agoIn my not so extensive Clojure experience, there's almost nothing you need to know about JVM to do real things with Clojure. If you're building something big/complex enough that you need to know something about the JVM, then you probably already discovered what you needed along the way. Basic Java interop is pretty simple (and concise!). But unless you're specifically needing a Java library, you won't even do this much. You _can_, but it tends to be more for performance optimization in my experience. In other words, don't be scared of JVM. I would say it's kind of like Elixir/Erlang. You can do real things with Elixir without knowing hardly anything about Erlang. Of course, later on you can do more awesome things if you know how and when to leverage the Erlang VM. Same probably goes for Clojure/JVM.